[PATCH] arm: LLVMLinux: Calculate pt_regs address from fp

Behan Webster behanw at converseincode.com
Fri Sep 6 19:02:52 EDT 2013


On 09/06/13 18:18, Russell King - ARM Linux wrote:
> On Fri, Sep 06, 2013 at 05:42:41PM -0400, behanw at converseincode.com wrote:
>> From: Behan Webster <behanw at converseincode.com>
>>
>> Use the frame pointer to calculate the end of the stack for current_pt_regs()
>> The existing code uses the stack pointer to do this calculation.
>> Using the frame pointer yeilds the same value in a more portable way.
>> This change supports being able to compile the kernel with gcc and clang.
> What happens when frame pointers are disabled on gcc?
Drat. Good point. Didn't think of that.

Could be rewritten to use current_stack_pointer (assuming the patch 
series that implements that would be amenable).

Thanks,

Behan

-- 
Behan Webster
behanw at converseincode.com




More information about the linux-arm-kernel mailing list