Generic Entry/Exit support for ppc64
cover Generic Entry/Exit support for ppc64
This is a syscall only implementation of generic entry/exit framework for framework for ppc. IRQ handling is not done in this RFC.
This will break the ppc32 build as of now which will be fixed along with IRQ handling.
Below are the performance benchmarks from perf bench basic syscall. This is for 1,00,00,000 getppid() calls
| Metric | Without Generic Framework | With Generic Framework | | ---------- | ------------------------- | ---------------------- | | Total time | 0.904 [sec] | 0.856 [sec] | | usecs/op | 0.090403 | 0.085638 | | ops/sec | 1,10,61,579 | 1,16,77,086 |
That's ~5% degradation as of now.
Mukesh Kumar Chaurasiya (6):
powerpc: rename arch_irq_disabled_regs
powerpc: Prepare to build with genreic entry/exit framework
powerpc: introduce arch_enter_from_user_mode
powerpc: Add flag in paca for register restore state
powerpc: Introduce syscall exit arch functions
powerpc: Enable Generic Entry/Exit for syscalls.
arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++ arch/powerpc/include/asm/hw_irq.h | 4 +- arch/powerpc/include/asm/interrupt.h | 117 +++++++++++++++++- arch/powerpc/include/asm/paca.h | 1 + arch/powerpc/include/asm/stacktrace.h | 8 ++ arch/powerpc/include/asm/syscall.h | 5 + arch/powerpc/include/asm/thread_info.h | 1 + arch/powerpc/kernel/interrupt.c | 153 ++++++----------------- arch/powerpc/kernel/ptrace/ptrace.c | 103 --------------- arch/powerpc/kernel/signal.c | 8 ++ arch/powerpc/kernel/syscall.c | 117 +----------------- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/kernel/watchdog.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- 15 files changed, 336 insertions(+), 346 deletions(-) create mode 100644 arch/powerpc/include/asm/entry-common.h
Signature · 1 line
2.49.0
RFC 1/6 powerpc: rename arch_irq_disabled_regs
Renaming arch_irq_disabled_regs to regs_irqs_disabled to be used commonly in generic entry exit framework and ppc arch code.
--- arch/powerpc/include/asm/hw_irq.h | 4 ++-- arch/powerpc/include/asm/interrupt.h | 12 ++++++------ arch/powerpc/kernel/interrupt.c | 4 ++-- arch/powerpc/kernel/syscall.c | 2 +- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/kernel/watchdog.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-)
arch/powerpc/include/asm/hw_irq.h +2 -2
@@ -393,7 +393,7 @@ static inline void do_hard_irq_enable(void)__hard_irq_enable (); } -static inline bool arch_irq_disabled_regs (struct pt_regs *regs) +static inline bool regs_irqs_disabled (struct pt_regs *regs) {return (regs->softe &IRQS_DISABLED ); }
@@ -466,7 +466,7 @@ static inline bool arch_irqs_disabled(void)#define hard_irq_disable () arch_local_irq_disable() -static inline bool arch_irq_disabled_regs (struct pt_regs *regs) +static inline bool regs_irqs_disabled (struct pt_regs *regs) {return !(regs->msr &MSR_EE ); }
arch/powerpc/include/asm/interrupt.h +6 -6
@@ -172,7 +172,7 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs)/* Enable MSR[RI] early, to support kernel SLB and hash faults */ #endif -if (!arch_irq_disabled_regs (regs)) +if (!regs_irqs_disabled (regs))trace_hardirqs_off ();if (user_mode (regs)) {
@@ -192,10 +192,10 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs)CT_WARN_ON (ct_state () !=CT_STATE_KERNEL &&ct_state () !=CT_STATE_IDLE );INT_SOFT_MASK_BUG_ON (regs,is_implicit_soft_masked (regs)); -INT_SOFT_MASK_BUG_ON (regs,arch_irq_disabled_regs (regs) && +INT_SOFT_MASK_BUG_ON (regs,regs_irqs_disabled (regs) &&search_kernel_restart_table (regs->nip)); } -INT_SOFT_MASK_BUG_ON (regs, !arch_irq_disabled_regs (regs) && +INT_SOFT_MASK_BUG_ON (regs, !regs_irqs_disabled (regs) && !(regs->msr &MSR_EE ));booke_restore_dbcr0 ();
@@ -298,7 +298,7 @@ static inline void interrupt_nmi_enter_prepare(struct pt_regs *regs, struct inte* Adjust regs->softe to be soft-masked if it had not been * reconcied (e.g., interrupt entry with MSR[EE]=0 but softe * not yet set disabled), or if it was in an implicit soft -* masked state. This makes arch_irq_disabled_regs(regs) +* masked state. This makes regs_irqs_disabled(regs) * behave as expected. */ regs->softe =IRQS_ALL_DISABLED ;
@@ -372,7 +372,7 @@ static inline void interrupt_nmi_exit_prepare(struct pt_regs *regs, struct inter #ifdef CONFIG_PPC64 #ifdef CONFIG_PPC_BOOK3S - if (arch_irq_disabled_regs(regs)) { + if (regs_irqs_disabled(regs)) { unsigned long rst = search_kernel_restart_table(regs->nip); if (rst) regs_set_return_ip(regs, rst);
@@ -661,7 +661,7 @@ void replay_soft_interrupts(void);static inline void interrupt_cond_local_irq_enable (struct pt_regs *regs) { -if (!arch_irq_disabled_regs (regs)) +if (!regs_irqs_disabled (regs))local_irq_enable (); }
arch/powerpc/kernel/interrupt.c +2 -2
@@ -343,7 +343,7 @@ notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs)unsigned long ret;BUG_ON (regs_is_unrecoverable (regs)); -BUG_ON (arch_irq_disabled_regs (regs)); +BUG_ON (regs_irqs_disabled (regs));CT_WARN_ON (ct_state () ==CT_STATE_USER );/*
@@ -392,7 +392,7 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)local_irq_disable (); -if (!arch_irq_disabled_regs (regs)) { +if (!regs_irqs_disabled (regs)) {/* Returning to a kernel context with local irqs enabled. */ WARN_ON_ONCE (!(regs->msr &MSR_EE )); again:
arch/powerpc/kernel/syscall.c +1 -1
@@ -32,7 +32,7 @@ notrace long system_call_exception(struct pt_regs *regs, unsigned long r0)BUG_ON (regs_is_unrecoverable (regs));BUG_ON (!user_mode (regs)); -BUG_ON (arch_irq_disabled_regs (regs)); +BUG_ON (regs_irqs_disabled (regs));#ifdef CONFIG_PPC_PKEY if (mmu_has_feature (MMU_FTR_PKEY )) {
arch/powerpc/kernel/traps.c +1 -1
@@ -1956,7 +1956,7 @@ DEFINE_INTERRUPT_HANDLER_RAW(performance_monitor_exception)* prevent hash faults on user addresses when reading callchains (and * looks better from an irq tracing perspective). */ -if (IS_ENABLED (CONFIG_PPC64 ) &&unlikely (arch_irq_disabled_regs (regs))) +if (IS_ENABLED (CONFIG_PPC64 ) &&unlikely (regs_irqs_disabled (regs)))performance_monitor_exception_nmi (regs);else performance_monitor_exception_async (regs);
arch/powerpc/kernel/watchdog.c +1 -1
@@ -373,7 +373,7 @@ DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt)u64 tb;/* should only arrive from kernel, with irqs disabled */ -WARN_ON_ONCE (!arch_irq_disabled_regs (regs)); +WARN_ON_ONCE (!regs_irqs_disabled (regs));if (!cpumask_test_cpu (cpu, &wd_cpus_enabled))return 0 ;
arch/powerpc/perf/core-book3s.c +1 -1
@@ -2483,7 +2483,7 @@ static void __perf_event_interrupt(struct pt_regs *regs)* will trigger a PMI after waking up from idle. Since counter values are _not_ * saved/restored in idle path, can lead to below "Can't find PMC" message. */ -if (unlikely (!found) && !arch_irq_disabled_regs (regs)) +if (unlikely (!found) && !regs_irqs_disabled (regs))printk_ratelimited (KERN_WARNING "Can't find PMC that caused IRQ\n" );/*
Signature · 1 line
2.49.0
RFC 2/6 powerpc: Prepare to build with genreic entry/exit framework
In reply to Mukesh Kumar ChaurasiyaEnabling build with generic entry/exit framework for powerpc architecture requires few necessary steps. This patch just takes care of the preparation.
--- arch/powerpc/include/asm/entry-common.h | 11 +++++++++++ arch/powerpc/include/asm/stacktrace.h | 8 ++++++++ arch/powerpc/include/asm/syscall.h | 5 +++++ arch/powerpc/include/asm/thread_info.h | 1 + 4 files changed, 25 insertions(+) create mode 100644 arch/powerpc/include/asm/entry-common.h
arch/powerpc/include/asm/entry-common.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _ASM_PPC_ENTRY_COMMON_H +#define _ASM_PPC_ENTRY_COMMON_H + +#ifdef CONFIG_GENERIC_ENTRY + +#include <asm/stacktrace.h> + +#endif /* CONFIG_GENERIC_ENTRY */ +#endif /* _ASM_PPC_ENTRY_COMMON_H */
arch/powerpc/include/asm/stacktrace.h +8 -0
@@ -8,6 +8,14 @@#ifndef _ASM_POWERPC_STACKTRACE_H#define _ASM_POWERPC_STACKTRACE_H +#include <linux/sched.h> +void show_user_instructions (struct pt_regs *regs); +static inline bool on_thread_stack (void ) +{ +return !(((unsigned long )(current->stack) ^ current_stack_pointer) + & ~(THREAD_SIZE -1 )); +} +#endif /* _ASM_POWERPC_STACKTRACE_H */
arch/powerpc/include/asm/syscall.h +5 -0
@@ -119,4 +119,9 @@ static inline int syscall_get_arch(struct task_struct *task) else return AUDIT_ARCH_PPC64; } + +static inline bool arch_syscall_is_vdso_sigreturn (struct pt_regs *regs) +{ +return false; +}#endif /* _ASM_SYSCALL_H */
arch/powerpc/include/asm/thread_info.h +1 -0
@@ -54,6 +54,7 @@struct thread_info {int preempt_count;/* 0 => preemptable, <0 => BUG */ +unsigned long syscall_work;/* SYSCALL_WORK_ flags */ #ifdef CONFIG_SMP unsigned int cpu;#endif
Signature · 1 line
2.49.0
RFC 3/6 powerpc: introduce arch_enter_from_user_mode
In reply to Mukesh Kumar ChaurasiyaIntroduce arch_enter_from_user_mode required by syscall entry.
--- arch/powerpc/include/asm/entry-common.h | 96 +++++++++++++++++++++++++ arch/powerpc/include/asm/interrupt.h | 23 ++++++ arch/powerpc/kernel/interrupt.c | 22 ------ 3 files changed, 119 insertions(+), 22 deletions(-)
arch/powerpc/include/asm/entry-common.h +96 -0
@@ -5,7 +5,103 @@#ifdef CONFIG_GENERIC_ENTRY +#include <asm/cputime.h> +#include <asm/interrupt.h> #include <asm/stacktrace.h> +#include <asm/tm.h> + +static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs) +{ +if (IS_ENABLED (CONFIG_PPC_IRQ_SOFT_MASK_DEBUG )) +BUG_ON (irq_soft_mask_return () !=IRQS_ALL_DISABLED ); + +BUG_ON (regs_is_unrecoverable (regs)); +BUG_ON (!user_mode (regs)); +BUG_ON (regs_irqs_disabled (regs)); + +#ifdef CONFIG_PPC_PKEY +if (mmu_has_feature (MMU_FTR_PKEY )) { +unsigned long amr, iamr; +bool flush_needed = false; +/* +* When entering from userspace we mostly have the AMR/IAMR +* different from kernel default values. Hence don't compare. +*/ + amr =mfspr (SPRN_AMR ); + iamr =mfspr (SPRN_IAMR ); + regs->amr = amr; + regs->iamr = iamr; +if (mmu_has_feature (MMU_FTR_KUAP )) { +mtspr (SPRN_AMR ,AMR_KUAP_BLOCKED ); + flush_needed = true; + } +if (mmu_has_feature (MMU_FTR_BOOK3S_KUEP )) { +mtspr (SPRN_IAMR ,AMR_KUEP_BLOCKED ); + flush_needed = true; + } +if (flush_needed) +isync (); + } else +#endif +kuap_assert_locked (); + +booke_restore_dbcr0 (); + +account_cpu_user_entry (); + +account_stolen_time (); + +/* +* This is not required for the syscall exit path, but makes the +* stack frame look nicer. If this was initialised in the first stack +* frame, or if the unwinder was taught the first stack frame always +* returns to user with IRQS_ENABLED, this store could be avoided! +*/ +irq_soft_mask_regs_set_state (regs,IRQS_ENABLED ); + +/* +* If system call is called with TM active, set _TIF_RESTOREALL to +* prevent RFSCV being used to return to userspace, because POWER9 +* TM implementation has problems with this instruction returning to +* transactional state. Final register values are not relevant because +* the transaction will be aborted upon return anyway. Or in the case +* of unsupported_scv SIGILL fault, the return state does not much +* matter because it's an edge case. +*/ +if (IS_ENABLED (CONFIG_PPC_TRANSACTIONAL_MEM ) && +unlikely (MSR_TM_TRANSACTIONAL (regs->msr))) +set_bits (_TIF_RESTOREALL, ¤t_thread_info ()->flags); + +/* +* If the system call was made with a transaction active, doom it and +* return without performing the system call. Unless it was an +* unsupported scv vector, in which case it's treated like an illegal +* instruction. +*/ +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM +if (unlikely (MSR_TM_TRANSACTIONAL (regs->msr)) && + !trap_is_unsupported_scv (regs)) { +/* Enable TM in the kernel, and disable EE (for scv) */ +hard_irq_disable (); +mtmsr (mfmsr () |MSR_TM ); + +/* tabort, this dooms the transaction, nothing else */ + asmvolatile (".long 0x7c00071d | ((%0) << 16)" + ::"r" (TM_CAUSE_SYSCALL |TM_CAUSE_PERSISTENT )); + +/* +* Userspace will never see the return value. Execution will +* resume after the tbegin. of the aborted transaction with the +* checkpointed register state. A context switch could occur +* or signal delivered to the process before resuming the +* doomed transaction context, but that should all be handled +* as expected. +*/ +return ; + } +#endif // CONFIG_PPC_TRANSACTIONAL_MEM +} +#define arch_enter_from_user_mode arch_enter_from_user_mode#endif /* CONFIG_GENERIC_ENTRY */ #endif /* _ASM_PPC_ENTRY_COMMON_H */
arch/powerpc/include/asm/interrupt.h +23 -0
@@ -138,6 +138,29 @@ static inline void nap_adjust_return(struct pt_regs *regs)#endif } +static inline void booke_load_dbcr0 (void ) +{ +#ifdef CONFIG_PPC_ADV_DEBUG_REGS +unsigned long dbcr0 = current->thread.debug.dbcr0; + +if (likely (!(dbcr0 &DBCR0_IDM ))) +return ; + +/* +* Check to see if the dbcr0 register is set up to debug. +* Use the internal debug mode bit to do this. +*/ +mtmsr (mfmsr () & ~MSR_DE ); +if (IS_ENABLED (CONFIG_PPC32 )) { +isync (); + global_dbcr0[smp_processor_id ()] =mfspr (SPRN_DBCR0 ); + } +mtspr (SPRN_DBCR0 , dbcr0); +mtspr (SPRN_DBSR ,-1 ); +#endif +} + +static inline void booke_restore_dbcr0 (void ) {#ifdef CONFIG_PPC_ADV_DEBUG_REGS
arch/powerpc/kernel/interrupt.c +0 -22
@@ -74,28 +74,6 @@ static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable)return true; } -static notrace void booke_load_dbcr0(void) -{ -#ifdef CONFIG_PPC_ADV_DEBUG_REGS -unsigned long dbcr0 = current->thread.debug.dbcr0; - -if (likely (!(dbcr0 &DBCR0_IDM ))) -return ; - -/* -* Check to see if the dbcr0 register is set up to debug. -* Use the internal debug mode bit to do this. -*/ -mtmsr (mfmsr () & ~MSR_DE ); -if (IS_ENABLED (CONFIG_PPC32 )) { -isync (); - global_dbcr0[smp_processor_id ()] =mfspr (SPRN_DBCR0 ); - } -mtspr (SPRN_DBCR0 , dbcr0); -mtspr (SPRN_DBSR ,-1 ); -#endif -} - static notrace void check_return_regs_valid(struct pt_regs *regs) {#ifdef CONFIG_PPC_BOOK3S_64
Signature · 1 line
2.49.0
RFC 4/6 powerpc: Add flag in paca for register restore state
In reply to Mukesh Kumar ChaurasiyaIn case of signal being processed we want to restore the GPRS. To save the state of whether we need to restore the registers or not a flag is introduced so that we can save the state for that cpu in case we want to save the register state.
--- arch/powerpc/include/asm/paca.h | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/include/asm/paca.h +1 -0
@@ -174,6 +174,7 @@ struct paca_struct {u8 irq_soft_mask;/* mask for irq soft masking */ u8 irq_happened;/* irq happened while soft-disabled */ u8 irq_work_pending;/* IRQ_WORK interrupt while soft-disable */ +u8 generic_fw_flags;/* Flags for generic framework */ #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE u8 pmcregs_in_use;/* pseries puts this in lppaca */ #endif
Signature · 1 line
2.49.0
RFC 5/6 powerpc: Introduce syscall exit arch functions
In reply to Mukesh Kumar ChaurasiyaIntroducing following functions for syscall exit
- arch_exit_to_user_mode_work
- arch_exit_to_user_mode_work_prepare
--- arch/powerpc/include/asm/entry-common.h | 51 +++++++++++++++ arch/powerpc/include/asm/interrupt.h | 82 +++++++++++++++++++++++++ arch/powerpc/kernel/interrupt.c | 81 ------------------------ arch/powerpc/kernel/signal.c | 14 +++++ 4 files changed, 147 insertions(+), 81 deletions(-)
arch/powerpc/include/asm/entry-common.h +51 -0
@@ -8,8 +8,14 @@#include <asm/cputime.h> #include <asm/interrupt.h> #include <asm/stacktrace.h> +#include <asm/switch_to.h> #include <asm/tm.h> +/* +* flags for paca->generic_fw_flags +*/ +#define GFW_RESTORE_ALL 0x01 + static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs) {if (IS_ENABLED (CONFIG_PPC_IRQ_SOFT_MASK_DEBUG ))
@@ -101,7 +107,52 @@ static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs) }#endif // CONFIG_PPC_TRANSACTIONAL_MEM } +#define arch_enter_from_user_mode arch_enter_from_user_mode +static inline void arch_exit_to_user_mode_prepare (struct pt_regs *regs, +unsigned long ti_work) +{ +unsigned long mathflags; + +if (IS_ENABLED (CONFIG_PPC_BOOK3S_64 ) &&IS_ENABLED (CONFIG_PPC_FPU )) { +if (IS_ENABLED (CONFIG_PPC_TRANSACTIONAL_MEM ) && +unlikely ((ti_work & _TIF_RESTORE_TM))) { +restore_tm_state (regs); + }else { + mathflags =MSR_FP ; + +if (cpu_has_feature (CPU_FTR_VSX )) + mathflags |=MSR_VEC |MSR_VSX ; +else if (cpu_has_feature (CPU_FTR_ALTIVEC )) + mathflags |=MSR_VEC ; + +/* +* If userspace MSR has all available FP bits set, +* then they are live and no need to restore. If not, +* it means the regs were given up and restore_math +* may decide to restore them (to avoid taking an FP +* fault). +*/ +if ((regs->msr & mathflags) != mathflags) +restore_math (regs); + } + } + +check_return_regs_valid (regs); +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM + local_paca->tm_scratch = regs->msr; +#endif +} +#define arch_exit_to_user_mode_prepare arch_exit_to_user_mode_prepare + +static __always_inline void arch_exit_to_user_mode(void) +{ +booke_load_dbcr0 (); + +account_cpu_user_exit (); +} +#define arch_exit_to_user_mode arch_exit_to_user_mode +#endif /* CONFIG_GENERIC_ENTRY */ #endif /* _ASM_PPC_ENTRY_COMMON_H */
arch/powerpc/include/asm/interrupt.h +82 -0
94 lines not on this page · raw message
arch/powerpc/kernel/interrupt.c +0 -81
93 lines not on this page · raw message
arch/powerpc/kernel/signal.c +14 -0
@@ -22,6 +22,11 @@#include "signal.h" +/* This will be removed */ +#ifdef CONFIG_GENERIC_ENTRY +#include <linux/entry-common.h> +#endif /* CONFIG_GENERIC_ENTRY */ +#ifdef CONFIG_VSX unsigned long copy_fpr_to_user (void __user *to,struct task_struct *task)
@@ -368,3 +373,12 @@ void signal_fault(struct task_struct *tsk, struct pt_regs *regs,printk_ratelimited (regs->msr &MSR_64BIT ? fm64 : fm32, tsk->comm,task_pid_nr (tsk), where, ptr, regs->nip, regs->link); } + +#ifdef CONFIG_GENERIC_ENTRY +void arch_do_signal_or_restart (struct pt_regs *regs) +{ +BUG_ON (regs != current->thread.regs); + local_paca->generic_fw_flags |=GFW_RESTORE_ALL ; +do_signal (current); +} +#endif /* CONFIG_GENERIC_ENTRY */
Signature · 1 line
2.49.0
RFC 6/6 powerpc: Enable Generic Entry/Exit for syscalls.
In reply to Mukesh Kumar ChaurasiyaEnable the syscall entry and exit path from generic framework.
--- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/interrupt.c | 46 +++++++---- arch/powerpc/kernel/ptrace/ptrace.c | 103 ------------------------ arch/powerpc/kernel/signal.c | 8 +- arch/powerpc/kernel/syscall.c | 117 +--------------------------- 5 files changed, 38 insertions(+), 237 deletions(-)
arch/powerpc/Kconfig +1 -0
@@ -202,6 +202,7 @@ config PPC select GENERIC_CPU_AUTOPROBE select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC select GENERIC_EARLY_IOREMAP + select GENERIC_ENTRY select GENERIC_GETTIMEOFDAY select GENERIC_IDLE_POLL_SETUP select GENERIC_IOREMAP
arch/powerpc/kernel/interrupt.c +33 -13
87 lines not on this page · raw message
arch/powerpc/kernel/ptrace/ptrace.c +0 -103
115 lines not on this page · raw message
arch/powerpc/kernel/signal.c +1 -7
@@ -6,6 +6,7 @@* Extracted from signal_32.c and signal_64.c */ +#include <linux/entry-common.h> #include <linux/resume_user_mode.h> #include <linux/signal.h> #include <linux/uprobes.h>
@@ -22,11 +23,6 @@#include "signal.h" -/* This will be removed */ -#ifdef CONFIG_GENERIC_ENTRY -#include <linux/entry-common.h> -#endif /* CONFIG_GENERIC_ENTRY */ -#ifdef CONFIG_VSX unsigned long copy_fpr_to_user (void __user *to,struct task_struct *task)
@@ -374,11 +370,9 @@ void signal_fault(struct task_struct *tsk, struct pt_regs *regs, task_pid_nr(tsk), where, ptr, regs->nip, regs->link); } -#ifdef CONFIG_GENERIC_ENTRY void arch_do_signal_or_restart (struct pt_regs *regs) {BUG_ON (regs != current->thread.regs); local_paca->generic_fw_flags |=GFW_RESTORE_ALL ;do_signal (current); } -#endif /* CONFIG_GENERIC_ENTRY */
arch/powerpc/kernel/syscall.c +3 -114
130 lines not on this page · raw message
Signature · 1 line
2.49.0
On Mon, Apr 28, 2025 at 08:52:20PM +0530, Mukesh Kumar Chaurasiya wrote:
Few corrections in the commit message:
Quoted 3 lines
This is a syscall only implementation of generic entry/exit framework for framework for ppc. IRQ handling is not done in this RFC.
s/framework for framework/framework
Quoted 12 lines
This will break the ppc32 build as of now which will be fixed along with IRQ handling.
Below are the performance benchmarks from perf bench basic syscall. This is for 1,00,00,000
getppid()calls| Metric | Without Generic Framework | With Generic Framework | | ---------- | ------------------------- | ---------------------- | | Total time | 0.904 [sec] | 0.856 [sec] | | usecs/op | 0.090403 | 0.085638 | | ops/sec | 1,10,61,579 | 1,16,77,086 |
The coloums are reversed here
| Metric | With Generic Framework | Without Generic Framework | | ---------- | ------------------------- | ------------------------- | | Total time | 0.904 [sec] | 0.856 [sec] | | usecs/op | 0.090403 | 0.085638 | | ops/sec | 1,10,61,579 | 1,16,77,086 |
Quoted 31 lines
That's ~5% degradation as of now.
Mukesh Kumar Chaurasiya (6):
powerpc: renamearch_irq_disabled_regs
powerpc: Prepare to build with genreic entry/exit framework
powerpc: introducearch_enter_from_user_mode
powerpc: Add flag in paca for register restore state
powerpc: Introduce syscall exit arch functions
powerpc: Enable Generic Entry/Exit for syscalls.arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++ arch/powerpc/include/asm/hw_irq.h | 4 +- arch/powerpc/include/asm/interrupt.h | 117 +++++++++++++++++- arch/powerpc/include/asm/paca.h | 1 + arch/powerpc/include/asm/stacktrace.h | 8 ++ arch/powerpc/include/asm/syscall.h | 5 + arch/powerpc/include/asm/thread_info.h | 1 + arch/powerpc/kernel/interrupt.c | 153 ++++++----------------- arch/powerpc/kernel/ptrace/ptrace.c | 103 --------------- arch/powerpc/kernel/signal.c | 8 ++ arch/powerpc/kernel/syscall.c | 117 +----------------- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/kernel/watchdog.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- 15 files changed, 336 insertions(+), 346 deletions(-) create mode 100644 arch/powerpc/include/asm/entry-common.hSignature · 1 line
2.49.0
Shrikanth Hegde
reviewerRe: [RFC V1 6/6] powerpc: Enable Generic Entry/Exit for syscalls.
In reply to Mukesh Kumar ChaurasiyaQuoted 3 lines · Mukesh Kumar Chaurasiya
Enable the syscall entry and exit path from generic framework.
Signed-off-by Mukesh Kumar Chaurasiya <[email protected]>
Hi Mukesh. Thanks for working on this. Trying to go through it.
Quoted 13 lines
--- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/interrupt.c | 46 +++++++---- arch/powerpc/kernel/ptrace/ptrace.c | 103 ------------------------ arch/powerpc/kernel/signal.c | 8 +- arch/powerpc/kernel/syscall.c | 117 +--------------------------- 5 files changed, 38 insertions(+), 237 deletions(-)arch/powerpc/Kconfig +0
-0
arch/powerpc/Kconfig config PPC · line 205
Quoted 4 lines
arch/powerpc/Kconfig +1
-0@@ -202,6 +202,7 @@ config PPC select GENERIC_CPU_AUTOPROBE select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC select GENERIC_EARLY_IOREMAP + select GENERIC_ENTRY
IMHO this should be enabled after irqentry_* is supported too.
Quoted 32 lines
arch/powerpc/Kconfig +0
-0select GENERIC_GETTIMEOFDAY select GENERIC_IDLE_POLL_SETUP select GENERIC_IOREMAParch/powerpc/kernel/interrupt.c +1
-5@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0-or-later #include <linux/context_tracking.h> +#include <linux/entry-common.h> #include <linux/err.h> #include <linux/compat.h> #include <linux/rseq.h> @@ -163,15 +164,10 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,unsigned long ret =0 ;bool is_not_scv = !IS_ENABLED (CONFIG_PPC_BOOK3S_64 ) || !scv; -CT_WARN_ON (ct_state () ==CT_STATE_USER ); -kuap_assert_locked (); regs->result = r3; -/* Check whether the syscall is issued inside a restartable sequence */ -rseq_syscall (regs); - ti_flags =read_thread_flags ();if (unlikely (r3 >= (unsigned long )-MAX_ERRNO ) && is_not_scv) {
arch/powerpc/kernel/interrupt.c notrace unsigned long syscall_exit_prepare(unsigned long r3, · line 200
Quoted 9 lines
arch/powerpc/kernel/interrupt.c +0
-3@@ -192,13 +188,27 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3, }if (unlikely (ti_flags & _TIF_SYSCALL_DOTRACE)) { -do_syscall_trace_leave (regs); ret |= _TIF_RESTOREALL; } -local_irq_disable (); - ret =interrupt_exit_user_prepare_main (ret, regs);
This loop i dont understand why.
arch/powerpc/kernel/interrupt.c notrace unsigned long syscall_exit_prepare(unsigned long r3, · line 195
Quoted 2 lines
arch/powerpc/kernel/interrupt.c +2
-0+again: +syscall_exit_to_user_mode (regs);
exit_to_user_mode also calls user_enter_irqoff.
so below user_enter_irqoff may be a nop or wrong.
also, syscall_exit_to_user_mode disables local interrupts first.
is local_irq_enable fixing something here?
Quoted 349 lines
arch/powerpc/kernel/interrupt.c +30
-5+ +user_enter_irqoff (); +if (!prep_irq_for_enabled_exit (true)) { +user_exit_irqoff (); +local_irq_enable (); +local_irq_disable (); + goto again; + } + +/* Restore user access locks last */ +kuap_user_restore (regs); +if (unlikely ((local_paca->generic_fw_flags &GFW_RESTORE_ALL ) ==GFW_RESTORE_ALL )) { + ret |= _TIF_RESTOREALL; + local_paca->generic_fw_flags &= ~GFW_RESTORE_ALL ; + }#ifdef CONFIG_PPC64 regs->exit_result = ret;#endif @@ -209,6 +219,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,#ifdef CONFIG_PPC64 notrace unsigned long syscall_exit_restart (unsigned long r3,struct pt_regs *regs) { +unsigned long ret =0 ;/* * This is called when detecting a soft-pending interrupt as well as * an alternate-return interrupt. So we can't just have the alternate @@ -222,14 +233,23 @@ notrace unsigned long syscall_exit_restart(unsigned long r3, struct pt_regs *reg#ifdef CONFIG_PPC_BOOK3S_64 set_kuap (AMR_KUAP_BLOCKED );#endif +again: +syscall_exit_to_user_mode (regs); -trace_hardirqs_off (); -user_exit_irqoff (); -account_cpu_user_entry (); +user_enter_irqoff (); +if (!prep_irq_for_enabled_exit (true)) { +user_exit_irqoff (); +local_irq_enable (); +local_irq_disable (); + goto again; + } -BUG_ON (!user_mode (regs)); +if (unlikely ((local_paca->generic_fw_flags &GFW_RESTORE_ALL ) ==GFW_RESTORE_ALL )) { + ret = _TIF_RESTOREALL; + local_paca->generic_fw_flags &= ~GFW_RESTORE_ALL ; + } - regs->exit_result =interrupt_exit_user_prepare_main (regs->exit_result, regs); + regs->exit_result |= ret;return regs->exit_result; }arch/powerpc/kernel/ptrace/ptrace.c +0
-103@@ -21,9 +21,6 @@#include <asm/switch_to.h> #include <asm/debug.h> -#define CREATE_TRACE_POINTS -#include <trace/events/syscalls.h> -#include "ptrace-decl.h" /* @@ -233,106 +230,6 @@ static int do_seccomp(struct pt_regs *regs)static inline int do_seccomp (struct pt_regs *regs) {return 0 ; }#endif /* CONFIG_SECCOMP */ -/** -* do_syscall_trace_enter() - Do syscall tracing on kernel entry. -* @regs: the pt_regs of the task to trace (current) -* -* Performs various types of tracing on syscall entry. This includes seccomp, -* ptrace, syscall tracepoints and audit. -* -* The pt_regs are potentially visible to userspace via ptrace, so their -* contents is ABI. -* -* One or more of the tracers may modify the contents of pt_regs, in particular -* to modify arguments or even the syscall number itself. -* -* It's also possible that a tracer can choose to reject the system call. In -* that case this function will return an illegal syscall number, and will put -* an appropriate return value in regs->r3. -* -* Return: the (possibly changed) syscall number. -*/ -long do_syscall_trace_enter (struct pt_regs *regs) -{ -u32 flags; - - flags =read_thread_flags () & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE); - -if (flags) { -int rc =ptrace_report_syscall_entry (regs); - -if (unlikely (flags & _TIF_SYSCALL_EMU)) { -/* -* A nonzero return code from -* ptrace_report_syscall_entry() tells us to prevent -* the syscall execution, but we are not going to -* execute it anyway. -* -* Returning -1 will skip the syscall execution. We want -* to avoid clobbering any registers, so we don't goto -* the skip label below. -*/ -return -1 ; - } - -if (rc) { -/* -* The tracer decided to abort the syscall. Note that -* the tracer may also just change regs->gpr[0] to an -* invalid syscall number, that is handled below on the -* exit path. -*/ - goto skip; - } - } - -/* Run seccomp after ptrace; allow it to set gpr[3]. */ -if (do_seccomp (regs)) -return -1 ; - -/* Avoid trace and audit when syscall is invalid. */ -if (regs->gpr[0 ] >= NR_syscalls) - goto skip; - -if (unlikely (test_thread_flag (TIF_SYSCALL_TRACEPOINT ))) -trace_sys_enter (regs, regs->gpr[0 ]); - -if (!is_32bit_task ()) -audit_syscall_entry (regs->gpr[0 ], regs->gpr[3 ], regs->gpr[4 ], - regs->gpr[5 ], regs->gpr[6 ]); -else -audit_syscall_entry (regs->gpr[0 ], - regs->gpr[3 ] &0xffffffff , - regs->gpr[4 ] &0xffffffff , - regs->gpr[5 ] &0xffffffff , - regs->gpr[6 ] &0xffffffff ); - -/* Return the possibly modified but valid syscall number */ -return regs->gpr[0 ]; - -skip: -/* -* If we are aborting explicitly, or if the syscall number is -* now invalid, set the return value to -ENOSYS. -*/ - regs->gpr[3 ] = -ENOSYS ; -return -1 ; -} - -void do_syscall_trace_leave (struct pt_regs *regs) -{ -int step; - -audit_syscall_exit (regs); - -if (unlikely (test_thread_flag (TIF_SYSCALL_TRACEPOINT ))) -trace_sys_exit (regs, regs->result); - - step =test_thread_flag (TIF_SINGLESTEP ); -if (step ||test_thread_flag (TIF_SYSCALL_TRACE )) -ptrace_report_syscall_exit (regs, step); -} -void __init pt_regs_check (void );/* arch/powerpc/kernel/signal.c +1
-7@@ -6,6 +6,7 @@* Extracted from signal_32.c and signal_64.c */ +#include <linux/entry-common.h> #include <linux/resume_user_mode.h> #include <linux/signal.h> #include <linux/uprobes.h> @@ -22,11 +23,6 @@#include "signal.h" -/* This will be removed */ -#ifdef CONFIG_GENERIC_ENTRY -#include <linux/entry-common.h> -#endif /* CONFIG_GENERIC_ENTRY */ -#ifdef CONFIG_VSX unsigned long copy_fpr_to_user (void __user *to,struct task_struct *task)@@ -374,11 +370,9 @@ void signal_fault(struct task_struct *tsk, struct pt_regs *regs, task_pid_nr(tsk), where, ptr, regs->nip, regs->link); } -#ifdef CONFIG_GENERIC_ENTRY void arch_do_signal_or_restart (struct pt_regs *regs) {BUG_ON (regs != current->thread.regs); local_paca->generic_fw_flags |=GFW_RESTORE_ALL ;do_signal (current); } -#endif /* CONFIG_GENERIC_ENTRY */ arch/powerpc/kernel/syscall.c +3
-114@@ -3,6 +3,7 @@#include <linux/compat.h> #include <linux/context_tracking.h> #include <linux/randomize_kstack.h> +#include <linux/entry-common.h> #include <asm/interrupt.h> #include <asm/kup.h> @@ -21,121 +22,9 @@ notrace long system_call_exception(struct pt_regs *regs, unsigned long r0)kuap_lock ();add_random_kstack_offset (); + r0 =syscall_enter_from_user_mode (regs, r0); -if (IS_ENABLED (CONFIG_PPC_IRQ_SOFT_MASK_DEBUG )) -BUG_ON (irq_soft_mask_return () !=IRQS_ALL_DISABLED ); - -trace_hardirqs_off ();/* finish reconciling */ - -CT_WARN_ON (ct_state () ==CT_STATE_KERNEL ); -user_exit_irqoff (); - -BUG_ON (regs_is_unrecoverable (regs)); -BUG_ON (!user_mode (regs)); -BUG_ON (regs_irqs_disabled (regs)); - -#ifdef CONFIG_PPC_PKEY -if (mmu_has_feature (MMU_FTR_PKEY )) { -unsigned long amr, iamr; -bool flush_needed = false; -/* -* When entering from userspace we mostly have the AMR/IAMR -* different from kernel default values. Hence don't compare. -*/ - amr =mfspr (SPRN_AMR ); - iamr =mfspr (SPRN_IAMR ); - regs->amr = amr; - regs->iamr = iamr; -if (mmu_has_feature (MMU_FTR_KUAP )) { -mtspr (SPRN_AMR ,AMR_KUAP_BLOCKED ); - flush_needed = true; - } -if (mmu_has_feature (MMU_FTR_BOOK3S_KUEP )) { -mtspr (SPRN_IAMR ,AMR_KUEP_BLOCKED ); - flush_needed = true; - } -if (flush_needed) -isync (); - } else -#endif -kuap_assert_locked (); - -booke_restore_dbcr0 (); - -account_cpu_user_entry (); - -account_stolen_time (); - -/* -* This is not required for the syscall exit path, but makes the -* stack frame look nicer. If this was initialised in the first stack -* frame, or if the unwinder was taught the first stack frame always -* returns to user with IRQS_ENABLED, this store could be avoided! -*/ -irq_soft_mask_regs_set_state (regs,IRQS_ENABLED ); - -/* -* If system call is called with TM active, set _TIF_RESTOREALL to -* prevent RFSCV being used to return to userspace, because POWER9 -* TM implementation has problems with this instruction returning to -* transactional state. Final register values are not relevant because -* the transaction will be aborted upon return anyway. Or in the case -* of unsupported_scv SIGILL fault, the return state does not much -* matter because it's an edge case. -*/ -if (IS_ENABLED (CONFIG_PPC_TRANSACTIONAL_MEM ) && -unlikely (MSR_TM_TRANSACTIONAL (regs->msr))) -set_bits (_TIF_RESTOREALL, ¤t_thread_info ()->flags); - -/* -* If the system call was made with a transaction active, doom it and -* return without performing the system call. Unless it was an -* unsupported scv vector, in which case it's treated like an illegal -* instruction. -*/ -#ifdef CONFIG_PPC_TRANSACTIONAL_MEM -if (unlikely (MSR_TM_TRANSACTIONAL (regs->msr)) && - !trap_is_unsupported_scv (regs)) { -/* Enable TM in the kernel, and disable EE (for scv) */ -hard_irq_disable (); -mtmsr (mfmsr () |MSR_TM ); - -/* tabort, this dooms the transaction, nothing else */ - asmvolatile (".long 0x7c00071d | ((%0) << 16)" - ::"r" (TM_CAUSE_SYSCALL |TM_CAUSE_PERSISTENT )); - -/* -* Userspace will never see the return value. Execution will -* resume after the tbegin. of the aborted transaction with the -* checkpointed register state. A context switch could occur -* or signal delivered to the process before resuming the -* doomed transaction context, but that should all be handled -* as expected. -*/ -return -ENOSYS ; - } -#endif // CONFIG_PPC_TRANSACTIONAL_MEM - -local_irq_enable (); - -if (unlikely (read_thread_flags () & _TIF_SYSCALL_DOTRACE)) { -if (unlikely (trap_is_unsupported_scv (regs))) { -/* Unsupported scv vector */ -_exception (SIGILL , regs,ILL_ILLOPC , regs->nip); -return regs->gpr[3 ]; - } -/* -* We use the return value of do_syscall_trace_enter() as the -* syscall number. If the syscall was rejected for any reason -* do_syscall_trace_enter() returns an invalid syscall number -* and the test against NR_syscalls will fail and the return -* value to be used is in regs->gpr[3]. -*/ - r0 =do_syscall_trace_enter (regs); -if (unlikely (r0 >= NR_syscalls)) -return regs->gpr[3 ]; - - }else if (unlikely (r0 >= NR_syscalls)) { +if (unlikely (r0 >= NR_syscalls)) {if (unlikely (trap_is_unsupported_scv (regs))) {/* Unsupported scv vector */ _exception (SIGILL , regs,ILL_ILLOPC , regs->nip);
kernel test robot
build botRe: [RFC V1 6/6] powerpc: Enable Generic Entry/Exit for syscalls.
In reply to Mukesh Kumar Chaurasiyakernel test robot noticed the following build errors:
Hi Mukesh,
[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:
[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.15-rc4 next-20250429] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mukesh-Kumar-Chaurasiya/powerpc-rename-arch_irq_disabled_regs/20250428-232533 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next patch link: https://lore.kernel.org/r/20250428152225.66044-9-mchauras%40linux.ibm.com patch subject: [RFC V1 6/6] powerpc: Enable Generic Entry/Exit for syscalls. config: powerpc-randconfig-001-20250430 (https://download.01.org/0day-ci/archive/20250430/[email protected]/config) compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250430/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/interrupt.c:212:16: error: use of undeclared identifier 'local_paca'
212 | if (unlikely((local_paca->generic_fw_flags & GFW_RESTORE_ALL) == GFW_RESTORE_ALL)) {
| ^
arch/powerpc/kernel/interrupt.c:214:3: error: use of undeclared identifier 'local_paca'
214 | local_paca->generic_fw_flags &= ~GFW_RESTORE_ALL;
| ^
2 errors generated.
--
>> arch/powerpc/kernel/signal.c:376:2: error: use of undeclared identifier 'local_paca'
376 | local_paca->generic_fw_flags |= GFW_RESTORE_ALL;
| ^1 error generated.
vim +/local_paca +212 arch/powerpc/kernel/interrupt.c
153
154 /*
155 * This should be called after a syscall returns, with r3 the return value
156 * from the syscall. If this function returns non-zero, the system call
157 * exit assembly should additionally load all GPR registers and CTR and XER
158 * from the interrupt frame.
159 *
160 * The function graph tracer can not trace the return side of this function,
161 * because RI=0 and soft mask state is "unreconciled", so it is marked notrace.
162 */
163 notrace unsigned long syscall_exit_prepare(unsigned long r3,
164 struct pt_regs *regs,
165 long scv)
166 {
167 unsigned long ti_flags;
168 unsigned long ret = 0;
169 bool is_not_scv = !IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !scv;
170
171 kuap_assert_locked();
172
173 regs->result = r3;
174
175 ti_flags = read_thread_flags();
176
177 if (unlikely(r3 >= (unsigned long)-MAX_ERRNO) && is_not_scv) {
178 if (likely(!(ti_flags & (_TIF_NOERROR | _TIF_RESTOREALL)))) {
179 r3 = -r3;
180 regs->ccr |= 0x10000000; /* Set SO bit in CR */
181 }
182 }
183
184 if (unlikely(ti_flags & _TIF_PERSYSCALL_MASK)) {
185 if (ti_flags & _TIF_RESTOREALL)
186 ret = _TIF_RESTOREALL;
187 else
188 regs->gpr[3] = r3;
189 clear_bits(_TIF_PERSYSCALL_MASK, ¤t_thread_info()->flags);
190 } else {
191 regs->gpr[3] = r3;
192 }
193
194 if (unlikely(ti_flags & _TIF_SYSCALL_DOTRACE)) {
195 ret |= _TIF_RESTOREALL;
196 }
197
198 again:
199 syscall_exit_to_user_mode(regs);
200
201 user_enter_irqoff();
202 if (!prep_irq_for_enabled_exit(true)) {
203 user_exit_irqoff();
204 local_irq_enable();
205 local_irq_disable();
206 goto again;
207 }
208
209 /* Restore user access locks last */
210 kuap_user_restore(regs);
211
> 212 if (unlikely((local_paca->generic_fw_flags & GFW_RESTORE_ALL) == GFW_RESTORE_ALL)) { 213 ret |= _TIF_RESTOREALL;
214 local_paca->generic_fw_flags &= ~GFW_RESTORE_ALL;
215 }
216 #ifdef CONFIG_PPC64
217 regs->exit_result = ret;
218 #endif
219
220 return ret;
221 }
222
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [RFC V1 6/6] powerpc: Enable Generic Entry/Exit for syscalls.
In reply to Mukesh Kumar Chaurasiyakernel test robot noticed the following build errors:
Hi Mukesh,
[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:
[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.15-rc4 next-20250429] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mukesh-Kumar-Chaurasiya/powerpc-rename-arch_irq_disabled_regs/20250428-232533 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next patch link: https://lore.kernel.org/r/20250428152225.66044-9-mchauras%40linux.ibm.com patch subject: [RFC V1 6/6] powerpc: Enable Generic Entry/Exit for syscalls. config: powerpc-randconfig-003-20250430 (https://download.01.org/0day-ci/archive/20250430/[email protected]/config) compiler: powerpc-linux-gcc (GCC) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250430/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All error/warnings (new ones prefixed by >>):
In file included from include/asm-generic/bug.h:5:0,
from arch/powerpc/include/asm/bug.h:116, from include/linux/bug.h:5,
from include/linux/thread_info.h:13, from arch/powerpc/include/asm/processor.h:41, from include/linux/sched.h:13,
from include/linux/context_tracking.h:5, from arch/powerpc/kernel/interrupt.c:3:
arch/powerpc/kernel/interrupt.c: In function 'syscall_exit_prepare':
>> arch/powerpc/kernel/interrupt.c:212:16: error: 'local_paca' undeclared (first use in this function); did you mean 'local_inc'?
if (unlikely((local_paca->generic_fw_flags & GFW_RESTORE_ALL) == GFW_RESTORE_ALL)) {
^
include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
arch/powerpc/kernel/interrupt.c:212:16: note: each undeclared identifier is reported only once for each function it appears in
if (unlikely((local_paca->generic_fw_flags & GFW_RESTORE_ALL) == GFW_RESTORE_ALL)) {
^
include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
--
arch/powerpc/kernel/signal.c: In function 'arch_do_signal_or_restart':
>> arch/powerpc/kernel/signal.c:376:2: error: 'local_paca' undeclared (first use in this function); did you mean 'local_inc'?
local_paca->generic_fw_flags |= GFW_RESTORE_ALL;
^~~~~~~~~~
local_inc
arch/powerpc/kernel/signal.c:376:2: note: each undeclared identifier is reported only once for each function it appears in
--
>> arch/powerpc/kernel/ptrace/ptrace.c:196:12: warning: 'do_seccomp' defined but not used [-Wunused-function] static int do_seccomp(struct pt_regs *regs)
^~~~~~~~~~
vim +212 arch/powerpc/kernel/interrupt.c
153
154 /*
155 * This should be called after a syscall returns, with r3 the return value
156 * from the syscall. If this function returns non-zero, the system call
157 * exit assembly should additionally load all GPR registers and CTR and XER
158 * from the interrupt frame.
159 *
160 * The function graph tracer can not trace the return side of this function,
161 * because RI=0 and soft mask state is "unreconciled", so it is marked notrace.
162 */
163 notrace unsigned long syscall_exit_prepare(unsigned long r3,
164 struct pt_regs *regs,
165 long scv)
166 {
167 unsigned long ti_flags;
168 unsigned long ret = 0;
169 bool is_not_scv = !IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !scv;
170
171 kuap_assert_locked();
172
173 regs->result = r3;
174
175 ti_flags = read_thread_flags();
176
177 if (unlikely(r3 >= (unsigned long)-MAX_ERRNO) && is_not_scv) {
178 if (likely(!(ti_flags & (_TIF_NOERROR | _TIF_RESTOREALL)))) {
179 r3 = -r3;
180 regs->ccr |= 0x10000000; /* Set SO bit in CR */
181 }
182 }
183
184 if (unlikely(ti_flags & _TIF_PERSYSCALL_MASK)) {
185 if (ti_flags & _TIF_RESTOREALL)
186 ret = _TIF_RESTOREALL;
187 else
188 regs->gpr[3] = r3;
189 clear_bits(_TIF_PERSYSCALL_MASK, ¤t_thread_info()->flags);
190 } else {
191 regs->gpr[3] = r3;
192 }
193
194 if (unlikely(ti_flags & _TIF_SYSCALL_DOTRACE)) {
195 ret |= _TIF_RESTOREALL;
196 }
197
198 again:
199 syscall_exit_to_user_mode(regs);
200
201 user_enter_irqoff();
202 if (!prep_irq_for_enabled_exit(true)) {
203 user_exit_irqoff();
204 local_irq_enable();
205 local_irq_disable();
206 goto again;
207 }
208
209 /* Restore user access locks last */
210 kuap_user_restore(regs);
211
> 212 if (unlikely((local_paca->generic_fw_flags & GFW_RESTORE_ALL) == GFW_RESTORE_ALL)) { 213 ret |= _TIF_RESTOREALL;
214 local_paca->generic_fw_flags &= ~GFW_RESTORE_ALL;
215 }
216 #ifdef CONFIG_PPC64
217 regs->exit_result = ret;
218 #endif
219
220 return ret;
221 }
222
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [RFC V1 6/6] powerpc: Enable Generic Entry/Exit for syscalls.
In reply to Shrikanth HegdeQuoted 17 lines · Shrikanth Hegde
Quoted 3 lines · Mukesh Kumar Chaurasiya
Enable the syscall entry and exit path from generic framework.
Signed-off-by Mukesh Kumar Chaurasiya <[email protected]>Hi Mukesh. Thanks for working on this. Trying to go through it.
Quoted 8 lines
--- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/interrupt.c | 46 +++++++---- arch/powerpc/kernel/ptrace/ptrace.c | 103 ------------------------ arch/powerpc/kernel/signal.c | 8 +- arch/powerpc/kernel/syscall.c | 117 +--------------------------- 5 files changed, 38 insertions(+), 237 deletions(-)
Quoted 12 lines
arch/powerpc/Kconfig config PPC · line 205
Quoted 9 lines
arch/powerpc/Kconfig +1
-0@@ -202,6 +202,7 @@ config PPC select GENERIC_CPU_AUTOPROBE select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC select GENERIC_EARLY_IOREMAP + select GENERIC_ENTRYIMHO this should be enabled after irqentry_* is supported too.
Yeah, it will be done after irq is supported. I did this just for the sake of syscall.
Quoted 28 lines
Quoted 28 lines
arch/powerpc/Kconfig +0
-0select GENERIC_GETTIMEOFDAY select GENERIC_IDLE_POLL_SETUP select GENERIC_IOREMAParch/powerpc/kernel/interrupt.c +1
-5@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0-or-later #include <linux/context_tracking.h> +#include <linux/entry-common.h> #include <linux/err.h> #include <linux/compat.h> #include <linux/rseq.h> @@ -163,15 +164,10 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,unsigned long ret =0 ;bool is_not_scv = !IS_ENABLED (CONFIG_PPC_BOOK3S_64 ) || !scv; -CT_WARN_ON (ct_state () ==CT_STATE_USER ); -kuap_assert_locked (); regs->result = r3; -/* Check whether the syscall is issued inside a restartable sequence */ -rseq_syscall (regs); - ti_flags =read_thread_flags ();if (unlikely (r3 >= (unsigned long )-MAX_ERRNO ) && is_not_scv) {@@ -192,13 +188,27 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3, }
Quoted 9 lines
arch/powerpc/kernel/interrupt.c notrace unsigned long syscall_exit_prepare(unsigned long r3, · line 200
Quoted 6 lines
arch/powerpc/kernel/interrupt.c +0
-3if (unlikely (ti_flags & _TIF_SYSCALL_DOTRACE)) { -do_syscall_trace_leave (regs); ret |= _TIF_RESTOREALL; } -local_irq_disable (); - ret =interrupt_exit_user_prepare_main (ret, regs);This loop i dont understand why.
This is if there are any interrupts to process.
Quoted 5 lines
arch/powerpc/kernel/interrupt.c notrace unsigned long syscall_exit_prepare(unsigned long r3, · line 193
Quoted 2 lines
arch/powerpc/kernel/interrupt.c +2
-0+again: +syscall_exit_to_user_mode (regs);
exit_to_user_modealso callsuser_enter_irqoff.
so belowuser_enter_irqoffmay be a nop or wrong.
Oh yeah, i'll fix this in next version.
Quoted 5 lines
also,
syscall_exit_to_user_modedisables local interrupts first.is
local_irq_enablefixing something here?
It just enables irq for a short while so we can receive interrupts.
Quoted 334 lines
Quoted 333 lines
arch/powerpc/kernel/interrupt.c +30
-5+ +user_enter_irqoff (); +if (!prep_irq_for_enabled_exit (true)) { +user_exit_irqoff (); +local_irq_enable (); +local_irq_disable (); + goto again; + } + +/* Restore user access locks last */ +kuap_user_restore (regs); +if (unlikely ((local_paca->generic_fw_flags &GFW_RESTORE_ALL ) ==GFW_RESTORE_ALL )) { + ret |= _TIF_RESTOREALL; + local_paca->generic_fw_flags &= ~GFW_RESTORE_ALL ; + }#ifdef CONFIG_PPC64 regs->exit_result = ret;#endif @@ -209,6 +219,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,#ifdef CONFIG_PPC64 notrace unsigned long syscall_exit_restart (unsigned long r3,struct pt_regs *regs) { +unsigned long ret =0 ;/* * This is called when detecting a soft-pending interrupt as well as * an alternate-return interrupt. So we can't just have the alternate @@ -222,14 +233,23 @@ notrace unsigned long syscall_exit_restart(unsigned long r3, struct pt_regs *reg#ifdef CONFIG_PPC_BOOK3S_64 set_kuap (AMR_KUAP_BLOCKED );#endif +again: +syscall_exit_to_user_mode (regs); -trace_hardirqs_off (); -user_exit_irqoff (); -account_cpu_user_entry (); +user_enter_irqoff (); +if (!prep_irq_for_enabled_exit (true)) { +user_exit_irqoff (); +local_irq_enable (); +local_irq_disable (); + goto again; + } -BUG_ON (!user_mode (regs)); +if (unlikely ((local_paca->generic_fw_flags &GFW_RESTORE_ALL ) ==GFW_RESTORE_ALL )) { + ret = _TIF_RESTOREALL; + local_paca->generic_fw_flags &= ~GFW_RESTORE_ALL ; + } - regs->exit_result =interrupt_exit_user_prepare_main (regs->exit_result, regs); + regs->exit_result |= ret;return regs->exit_result; }arch/powerpc/kernel/ptrace/ptrace.c +0
-103@@ -21,9 +21,6 @@#include <asm/switch_to.h> #include <asm/debug.h> -#define CREATE_TRACE_POINTS -#include <trace/events/syscalls.h> -#include "ptrace-decl.h" /* @@ -233,106 +230,6 @@ static int do_seccomp(struct pt_regs *regs)static inline int do_seccomp (struct pt_regs *regs) {return 0 ; }#endif /* CONFIG_SECCOMP */ -/** -* do_syscall_trace_enter() - Do syscall tracing on kernel entry. -* @regs: the pt_regs of the task to trace (current) -* -* Performs various types of tracing on syscall entry. This includes seccomp, -* ptrace, syscall tracepoints and audit. -* -* The pt_regs are potentially visible to userspace via ptrace, so their -* contents is ABI. -* -* One or more of the tracers may modify the contents of pt_regs, in particular -* to modify arguments or even the syscall number itself. -* -* It's also possible that a tracer can choose to reject the system call. In -* that case this function will return an illegal syscall number, and will put -* an appropriate return value in regs->r3. -* -* Return: the (possibly changed) syscall number. -*/ -long do_syscall_trace_enter (struct pt_regs *regs) -{ -u32 flags; - - flags =read_thread_flags () & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE); - -if (flags) { -int rc =ptrace_report_syscall_entry (regs); - -if (unlikely (flags & _TIF_SYSCALL_EMU)) { -/* -* A nonzero return code from -* ptrace_report_syscall_entry() tells us to prevent -* the syscall execution, but we are not going to -* execute it anyway. -* -* Returning -1 will skip the syscall execution. We want -* to avoid clobbering any registers, so we don't goto -* the skip label below. -*/ -return -1 ; - } - -if (rc) { -/* -* The tracer decided to abort the syscall. Note that -* the tracer may also just change regs->gpr[0] to an -* invalid syscall number, that is handled below on the -* exit path. -*/ - goto skip; - } - } - -/* Run seccomp after ptrace; allow it to set gpr[3]. */ -if (do_seccomp (regs)) -return -1 ; - -/* Avoid trace and audit when syscall is invalid. */ -if (regs->gpr[0 ] >= NR_syscalls) - goto skip; - -if (unlikely (test_thread_flag (TIF_SYSCALL_TRACEPOINT ))) -trace_sys_enter (regs, regs->gpr[0 ]); - -if (!is_32bit_task ()) -audit_syscall_entry (regs->gpr[0 ], regs->gpr[3 ], regs->gpr[4 ], - regs->gpr[5 ], regs->gpr[6 ]); -else -audit_syscall_entry (regs->gpr[0 ], - regs->gpr[3 ] &0xffffffff , - regs->gpr[4 ] &0xffffffff , - regs->gpr[5 ] &0xffffffff , - regs->gpr[6 ] &0xffffffff ); - -/* Return the possibly modified but valid syscall number */ -return regs->gpr[0 ]; - -skip: -/* -* If we are aborting explicitly, or if the syscall number is -* now invalid, set the return value to -ENOSYS. -*/ - regs->gpr[3 ] = -ENOSYS ; -return -1 ; -} - -void do_syscall_trace_leave (struct pt_regs *regs) -{ -int step; - -audit_syscall_exit (regs); - -if (unlikely (test_thread_flag (TIF_SYSCALL_TRACEPOINT ))) -trace_sys_exit (regs, regs->result); - - step =test_thread_flag (TIF_SINGLESTEP ); -if (step ||test_thread_flag (TIF_SYSCALL_TRACE )) -ptrace_report_syscall_exit (regs, step); -} -void __init pt_regs_check (void );/* arch/powerpc/kernel/signal.c +1
-7@@ -6,6 +6,7 @@* Extracted from signal_32.c and signal_64.c */ +#include <linux/entry-common.h> #include <linux/resume_user_mode.h> #include <linux/signal.h> #include <linux/uprobes.h> @@ -22,11 +23,6 @@#include "signal.h" -/* This will be removed */ -#ifdef CONFIG_GENERIC_ENTRY -#include <linux/entry-common.h> -#endif /* CONFIG_GENERIC_ENTRY */ -#ifdef CONFIG_VSX unsigned long copy_fpr_to_user (void __user *to,struct task_struct *task)@@ -374,11 +370,9 @@ void signal_fault(struct task_struct *tsk, struct pt_regs *regs, task_pid_nr(tsk), where, ptr, regs->nip, regs->link); } -#ifdef CONFIG_GENERIC_ENTRY void arch_do_signal_or_restart (struct pt_regs *regs) {BUG_ON (regs != current->thread.regs); local_paca->generic_fw_flags |=GFW_RESTORE_ALL ;do_signal (current); } -#endif /* CONFIG_GENERIC_ENTRY */ arch/powerpc/kernel/syscall.c +3
-114@@ -3,6 +3,7 @@#include <linux/compat.h> #include <linux/context_tracking.h> #include <linux/randomize_kstack.h> +#include <linux/entry-common.h> #include <asm/interrupt.h> #include <asm/kup.h> @@ -21,121 +22,9 @@ notrace long system_call_exception(struct pt_regs *regs, unsigned long r0)kuap_lock ();add_random_kstack_offset (); + r0 =syscall_enter_from_user_mode (regs, r0); -if (IS_ENABLED (CONFIG_PPC_IRQ_SOFT_MASK_DEBUG )) -BUG_ON (irq_soft_mask_return () !=IRQS_ALL_DISABLED ); - -trace_hardirqs_off ();/* finish reconciling */ - -CT_WARN_ON (ct_state () ==CT_STATE_KERNEL ); -user_exit_irqoff (); - -BUG_ON (regs_is_unrecoverable (regs)); -BUG_ON (!user_mode (regs)); -BUG_ON (regs_irqs_disabled (regs)); - -#ifdef CONFIG_PPC_PKEY -if (mmu_has_feature (MMU_FTR_PKEY )) { -unsigned long amr, iamr; -bool flush_needed = false; -/* -* When entering from userspace we mostly have the AMR/IAMR -* different from kernel default values. Hence don't compare. -*/ - amr =mfspr (SPRN_AMR ); - iamr =mfspr (SPRN_IAMR ); - regs->amr = amr; - regs->iamr = iamr; -if (mmu_has_feature (MMU_FTR_KUAP )) { -mtspr (SPRN_AMR ,AMR_KUAP_BLOCKED ); - flush_needed = true; - } -if (mmu_has_feature (MMU_FTR_BOOK3S_KUEP )) { -mtspr (SPRN_IAMR ,AMR_KUEP_BLOCKED ); - flush_needed = true; - } -if (flush_needed) -isync (); - } else -#endif -kuap_assert_locked (); - -booke_restore_dbcr0 (); - -account_cpu_user_entry (); - -account_stolen_time (); - -/* -* This is not required for the syscall exit path, but makes the -* stack frame look nicer. If this was initialised in the first stack -* frame, or if the unwinder was taught the first stack frame always -* returns to user with IRQS_ENABLED, this store could be avoided! -*/ -irq_soft_mask_regs_set_state (regs,IRQS_ENABLED ); - -/* -* If system call is called with TM active, set _TIF_RESTOREALL to -* prevent RFSCV being used to return to userspace, because POWER9 -* TM implementation has problems with this instruction returning to -* transactional state. Final register values are not relevant because -* the transaction will be aborted upon return anyway. Or in the case -* of unsupported_scv SIGILL fault, the return state does not much -* matter because it's an edge case. -*/ -if (IS_ENABLED (CONFIG_PPC_TRANSACTIONAL_MEM ) && -unlikely (MSR_TM_TRANSACTIONAL (regs->msr))) -set_bits (_TIF_RESTOREALL, ¤t_thread_info ()->flags); - -/* -* If the system call was made with a transaction active, doom it and -* return without performing the system call. Unless it was an -* unsupported scv vector, in which case it's treated like an illegal -* instruction. -*/ -#ifdef CONFIG_PPC_TRANSACTIONAL_MEM -if (unlikely (MSR_TM_TRANSACTIONAL (regs->msr)) && - !trap_is_unsupported_scv (regs)) { -/* Enable TM in the kernel, and disable EE (for scv) */ -hard_irq_disable (); -mtmsr (mfmsr () |MSR_TM ); - -/* tabort, this dooms the transaction, nothing else */ - asmvolatile (".long 0x7c00071d | ((%0) << 16)" - ::"r" (TM_CAUSE_SYSCALL |TM_CAUSE_PERSISTENT )); - -/* -* Userspace will never see the return value. Execution will -* resume after the tbegin. of the aborted transaction with the -* checkpointed register state. A context switch could occur -* or signal delivered to the process before resuming the -* doomed transaction context, but that should all be handled -* as expected. -*/ -return -ENOSYS ; - } -#endif // CONFIG_PPC_TRANSACTIONAL_MEM - -local_irq_enable (); - -if (unlikely (read_thread_flags () & _TIF_SYSCALL_DOTRACE)) { -if (unlikely (trap_is_unsupported_scv (regs))) { -/* Unsupported scv vector */ -_exception (SIGILL , regs,ILL_ILLOPC , regs->nip); -return regs->gpr[3 ]; - } -/* -* We use the return value of do_syscall_trace_enter() as the -* syscall number. If the syscall was rejected for any reason -* do_syscall_trace_enter() returns an invalid syscall number -* and the test against NR_syscalls will fail and the return -* value to be used is in regs->gpr[3]. -*/ - r0 =do_syscall_trace_enter (regs); -if (unlikely (r0 >= NR_syscalls)) -return regs->gpr[3 ]; - - }else if (unlikely (r0 >= NR_syscalls)) { +if (unlikely (r0 >= NR_syscalls)) {if (unlikely (trap_is_unsupported_scv (regs))) {/* Unsupported scv vector */ _exception (SIGILL , regs,ILL_ILLOPC , regs->nip);
Quoted 9 lines · Mukesh Kumar Chaurasiya
This is a syscall only implementation of generic entry/exit framework for framework for ppc. IRQ handling is not done in this RFC.
This will break the ppc32 build as of now which will be fixed along with IRQ handling.
Below are the performance benchmarks from perf bench basic syscall. This is for 1,00,00,000
getppid()calls
Quoted 7 lines
| Metric | Without Generic Framework | With Generic Framework | | ---------- | ------------------------- | ---------------------- | | Total time | 0.904 [sec] | 0.856 [sec] | | usecs/op | 0.090403 | 0.085638 | | ops/sec | 1,10,61,579 | 1,16,77,086 |That's ~5% degradation as of now.
Is the table header inverted? That reads like a ~5% improvement with the generic version.
Ankur
Quoted 17 lines
Mukesh Kumar Chaurasiya (6):
powerpc: renamearch_irq_disabled_regs
powerpc: Prepare to build with genreic entry/exit framework
powerpc: introducearch_enter_from_user_mode
powerpc: Add flag in paca for register restore state
powerpc: Introduce syscall exit arch functions
powerpc: Enable Generic Entry/Exit for syscalls.arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++ arch/powerpc/include/asm/hw_irq.h | 4 +- arch/powerpc/include/asm/interrupt.h | 117 +++++++++++++++++- arch/powerpc/include/asm/paca.h | 1 + arch/powerpc/include/asm/stacktrace.h | 8 ++ arch/powerpc/include/asm/syscall.h | 5 + arch/powerpc/include/asm/thread_info.h | 1 + arch/powerpc/kernel/interrupt.c | 153 ++++++-----------------
Quoted 8 lines
arch/powerpc/kernel/ptrace/ptrace.c | 103 --------------- arch/powerpc/kernel/signal.c | 8 ++ arch/powerpc/kernel/syscall.c | 117 +----------------- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/kernel/watchdog.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- 15 files changed, 336 insertions(+), 346 deletions(-) create mode 100644 arch/powerpc/include/asm/entry-common.h
--
ankur
Quoted 17 lines · Ankur Arora
Quoted 15 lines · Mukesh Kumar Chaurasiya
This is a syscall only implementation of generic entry/exit framework for framework for ppc. IRQ handling is not done in this RFC.
This will break the ppc32 build as of now which will be fixed along with IRQ handling.
Below are the performance benchmarks from perf bench basic syscall. This is for 1,00,00,000
getppid()calls| Metric | Without Generic Framework | With Generic Framework | | ---------- | ------------------------- | ---------------------- | | Total time | 0.904 [sec] | 0.856 [sec] | | usecs/op | 0.090403 | 0.085638 | | ops/sec | 1,10,61,579 | 1,16,77,086 |
Quoted 4 lines
Quoted 1 line
That's ~5% degradation as of now.
Is the table header inverted? That reads like a ~5% improvement with the generic version.
Please ignore. Just noticed your update down thread.
Quoted 17 lines
Quoted 17 lines
Mukesh Kumar Chaurasiya (6):
powerpc: renamearch_irq_disabled_regs
powerpc: Prepare to build with genreic entry/exit framework
powerpc: introducearch_enter_from_user_mode
powerpc: Add flag in paca for register restore state
powerpc: Introduce syscall exit arch functions
powerpc: Enable Generic Entry/Exit for syscalls.arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++ arch/powerpc/include/asm/hw_irq.h | 4 +- arch/powerpc/include/asm/interrupt.h | 117 +++++++++++++++++- arch/powerpc/include/asm/paca.h | 1 + arch/powerpc/include/asm/stacktrace.h | 8 ++ arch/powerpc/include/asm/syscall.h | 5 + arch/powerpc/include/asm/thread_info.h | 1 + arch/powerpc/kernel/interrupt.c | 153 ++++++-----------------
Quoted 8 lines
Quoted 8 lines
arch/powerpc/kernel/ptrace/ptrace.c | 103 --------------- arch/powerpc/kernel/signal.c | 8 ++ arch/powerpc/kernel/syscall.c | 117 +----------------- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/kernel/watchdog.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- 15 files changed, 336 insertions(+), 346 deletions(-) create mode 100644 arch/powerpc/include/asm/entry-common.h
--
ankur