Changeset 128359eb in mainline for kernel/arch/ia64/include


Ignore:
Timestamp:
2020-06-12T16:46:32Z (6 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ffccdff0
Parents:
94e75cf
Message:

Replace get_stack_base() with builtin_frame_address(0)

The usage of an intrinsic function to obtain the current stack pointer
should provide the compuler more room for performance optimizations than
the hand-written (and volatile) inline assembly block.

Location:
kernel/arch/ia64/include/arch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/include/arch/asm.h

    r94e75cf r128359eb  
    160160}
    161161
    162 /** Return base address of current memory stack.
    163  *
    164  * The memory stack is assumed to be STACK_SIZE / 2 long. Note that there is
    165  * also the RSE stack, which takes up the upper half of STACK_SIZE.
    166  * The memory stack must start on page boundary.
    167  */
    168 _NO_TRACE static inline uintptr_t get_stack_base(void)
    169 {
    170         uint64_t value;
    171 
    172         asm volatile (
    173             "mov %[value] = r12"
    174             : [value] "=r" (value)
    175         );
    176 
    177         return (value & (~(STACK_SIZE / 2 - 1)));
    178 }
    179 
    180162/** Return Processor State Register.
    181163 *
  • kernel/arch/ia64/include/arch/context.h

    r94e75cf r128359eb  
    4646 * No need to allocate scratch area.
    4747 *
    48  * One item is put onto the stack to support get_stack_base().
     48 * One item is put onto the stack to support CURRENT.
    4949 */
    5050#define SP_DELTA  (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
Note: See TracChangeset for help on using the changeset viewer.