Only call smp_fetch_global_regs if CONFIG_MAGIC_SYSRQ is
PATCH 1/1 Only call smp_fetch_global_regs if CONFIG_MAGIC_SYSRQ is
sparc64: Only call smp_fetch_global_regs if CONFIG_MAGIC_SYSRQ is set
Fixes this build error:
arch/sparc64/kernel/built-in.o: In function `__trigger_all_cpu_backtrace':
(.text+0xa88): undefined reference to `smp_fetch_global_regs'
--- arch/sparc64/kernel/process.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/sparc64/kernel/process.c +2 -0
@@ -311,7 +311,9 @@ void __trigger_all_cpu_backtrace(void)__global_reg_self (tp, regs, this_cpu); +#ifdef CONFIG_MAGIC_SYSRQ smp_fetch_global_regs (); +#endif for_each_online_cpu (cpu) {struct global_reg_snapshot *gp = &global_reg_snapshot[cpu];
Re: [PATCH] Only call smp_fetch_global_regs if CONFIG_MAGIC_SYSRQ
From: Friedrich Oslage <[email protected]>
Date: Sat, 9 Aug 2008 14:31:44 +0200
Quoted 7 lines
sparc64: Only call
smp_fetch_global_regsifCONFIG_MAGIC_SYSRQis setFixes this build error:
arch/sparc64/kernel/built-in.o: In function `__trigger_all_cpu_backtrace':
(.text+0xa88): undefined reference to `smp_fetch_global_regs'Signed-off-by Friedrich Oslage <[email protected]>
No, the intention is to provide this facility for __trigger_all_cpu_backtrace even if MAGIC_SYSRQ is not set.
The only part that should have MAGIC_SYSRQ ifdef protection is the sparc_globalreg_op sysrq regitration and immediate code.
Therefore I'll commit something like the following:
arch/sparc64/kernel/smp.c +0 -4
@@ -858,9 +858,7 @@ void smp_tsb_sync(struct mm_struct *mm)extern unsigned long xcall_flush_tlb_mm;extern unsigned long xcall_flush_tlb_pending;extern unsigned long xcall_flush_tlb_kernel_range; -#ifdef CONFIG_MAGIC_SYSRQ extern unsigned long xcall_fetch_glob_regs; -#endif extern unsigned long xcall_receive_signal;extern unsigned long xcall_new_mmu_context_version;#ifdef CONFIG_KGDB
@@ -1005,12 +1003,10 @@ void kgdb_roundup_cpus(unsigned long flags) }#endif -#ifdef CONFIG_MAGIC_SYSRQ void smp_fetch_global_regs (void ) {smp_cross_call (&xcall_fetch_glob_regs,0 ,0 ,0 ); } -#endif /* We know that the window frames of the user have been flushed * to the stack before we get here because all callers of us
arch/sparc64/mm/ultra.S +0 -2
@@ -480,7 +480,6 @@ xcall_sync_tick: b rtrap_xcall ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 -#ifdef CONFIG_MAGIC_SYSRQ .globl xcall_fetch_glob_regs xcall_fetch_glob_regs: sethi %hi(global_reg_snapshot), %g1
@@ -511,7 +510,6 @@ xcall_fetch_glob_regs: membar #StoreStore stx %g3, [%g1 + GR_SNAP_THREAD] retry -#endif /* CONFIG_MAGIC_SYSRQ */ #ifdef DCACHE_ALIASING_POSSIBLE .align 32