[linux-yocto] [PATCH] powerpc: correct the preempt-lazy assembly
Bruce Ashfield
bruce.ashfield at windriver.com
Wed Sep 26 07:11:46 PDT 2018
I have a full update to the latest 4.18-rt pending, so I'll
confirm that these are part of it, and do the update that
way.
Cheers,
Bruce
On 2018-09-26 2:42 AM, zhe.he at windriver.com wrote:
> From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
>
> The powerpc port won't compile and abort with "Error: operand out of
> range" because the TIF_NEED_RESCHED_LAZY uses bit 20 which is larger
> than 15 which is the upper limit.
> Swap it with TIF_32BIT and fixup the assembly in one assembly file to
> get it to compile again.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
>
> To fix the following build error for powerpc, backport a commit released with
> v4.18.5-rt3(https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.18.y-rt&id=7bcb4eb241e37d111cbca61a86ea0da180a6f2b3).
> arch/powerpc/kernel/entry_32.S: Assembler messages:
> arch/powerpc/kernel/entry_32.S:384: Error: operand out of range (0x000000000010ffef is not between 0x0000000000000000 and 0x000000000000ffff)
> ...
>
> Signed-off-by: He Zhe <zhe.he at windriver.com>
> ---
> This is for preempt-rt/base.
>
> arch/powerpc/include/asm/thread_info.h | 4 ++--
> arch/powerpc/kernel/entry_64.S | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
> index 4317598..15c2c09 100644
> --- a/arch/powerpc/include/asm/thread_info.h
> +++ b/arch/powerpc/include/asm/thread_info.h
> @@ -82,7 +82,7 @@ extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src
> #define TIF_SIGPENDING 1 /* signal pending */
> #define TIF_NEED_RESCHED 2 /* rescheduling necessary */
> #define TIF_FSCHECK 3 /* Check FS is USER_DS on return */
> -#define TIF_32BIT 4 /* 32 bit binary */
> +#define TIF_NEED_RESCHED_LAZY 4 /* lazy rescheduling necessary */
> #define TIF_RESTORE_TM 5 /* need to restore TM FP/VEC/VSX */
> #define TIF_PATCH_PENDING 6 /* pending live patching update */
> #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
> @@ -101,7 +101,7 @@ extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src
> #define TIF_ELF2ABI 18 /* function descriptors must die! */
> #endif
> #define TIF_POLLING_NRFLAG 19 /* true if poll_idle() is polling TIF_NEED_RESCHED */
> -#define TIF_NEED_RESCHED_LAZY 20 /* lazy rescheduling necessary */
> +#define TIF_32BIT 20 /* 32 bit binary */
>
> /* as above, but as bit values */
> #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> index 0c519f5..9a2e564 100644
> --- a/arch/powerpc/kernel/entry_64.S
> +++ b/arch/powerpc/kernel/entry_64.S
> @@ -168,7 +168,7 @@ system_call: /* label this so stack traces look sane */
> * based on caller's run-mode / personality.
> */
> ld r11,SYS_CALL_TABLE at toc(2)
> - andi. r10,r10,_TIF_32BIT
> + andis. r10,r10,_TIF_32BIT at h
> beq 15f
> addi r11,r11,8 /* use 32-bit syscall entries */
> clrldi r3,r3,32
>
More information about the linux-yocto
mailing list