aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-05-11 16:07:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-05-11 16:07:22 -0400
commit5c6b54600dd390a355a0e91ffd7998382908e178 (patch)
treeee8f7623608e421208dafa475197867becd8b172
parentc110a8b792533fc1180188b91b856bb2b3390f8b (diff)
parent6c0a8f6b5a45ac892a763b6299bd3c5324fc5e02 (diff)
Merge tag 'powerpc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: "One fix for an actual regression, the change to the SYSCALL_DEFINE wrapper broke FTRACE_SYSCALLS for us due to a name mismatch. There's also another commit to the same code to make sure we match all our syscalls with various prefixes. And then just one minor build fix, and the removal of an unused variable that was removed and then snuck back in due to some rebasing. Thanks to: Naveen N. Rao" * tag 'powerpc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: Fix CONFIG_NUMA=n build powerpc/trace/syscalls: Update syscall name matching logic to account for ppc_ prefix powerpc/trace/syscalls: Update syscall name matching logic powerpc/64: Remove unused paca->soft_enabled
-rw-r--r--arch/powerpc/include/asm/ftrace.h29
-rw-r--r--arch/powerpc/include/asm/paca.h1
-rw-r--r--arch/powerpc/include/asm/topology.h13
3 files changed, 26 insertions, 17 deletions
diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h
index 9abddde372ab..b2dabd06659d 100644
--- a/arch/powerpc/include/asm/ftrace.h
+++ b/arch/powerpc/include/asm/ftrace.h
@@ -69,17 +69,30 @@ struct dyn_arch_ftrace {
69#endif 69#endif
70 70
71#if defined(CONFIG_FTRACE_SYSCALLS) && !defined(__ASSEMBLY__) 71#if defined(CONFIG_FTRACE_SYSCALLS) && !defined(__ASSEMBLY__)
72#ifdef PPC64_ELF_ABI_v1 72/*
73 * Some syscall entry functions on powerpc start with "ppc_" (fork and clone,
74 * for instance) or ppc32_/ppc64_. We should also match the sys_ variant with
75 * those.
76 */
73#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME 77#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
78#ifdef PPC64_ELF_ABI_v1
79static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
80{
81 /* We need to skip past the initial dot, and the __se_sys alias */
82 return !strcmp(sym + 1, name) ||
83 (!strncmp(sym, ".__se_sys", 9) && !strcmp(sym + 6, name)) ||
84 (!strncmp(sym, ".ppc_", 5) && !strcmp(sym + 5, name + 4)) ||
85 (!strncmp(sym, ".ppc32_", 7) && !strcmp(sym + 7, name + 4)) ||
86 (!strncmp(sym, ".ppc64_", 7) && !strcmp(sym + 7, name + 4));
87}
88#else
74static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) 89static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
75{ 90{
76 /* 91 return !strcmp(sym, name) ||
77 * Compare the symbol name with the system call name. Skip the .sys or .SyS 92 (!strncmp(sym, "__se_sys", 8) && !strcmp(sym + 5, name)) ||
78 * prefix from the symbol name and the sys prefix from the system call name and 93 (!strncmp(sym, "ppc_", 4) && !strcmp(sym + 4, name + 4)) ||
79 * just match the rest. This is only needed on ppc64 since symbol names on 94 (!strncmp(sym, "ppc32_", 6) && !strcmp(sym + 6, name + 4)) ||
80 * 32bit do not start with a period so the generic function will work. 95 (!strncmp(sym, "ppc64_", 6) && !strcmp(sym + 6, name + 4));
81 */
82 return !strcmp(sym + 4, name + 3);
83} 96}
84#endif 97#endif
85#endif /* CONFIG_FTRACE_SYSCALLS && !__ASSEMBLY__ */ 98#endif /* CONFIG_FTRACE_SYSCALLS && !__ASSEMBLY__ */
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h
index 4185f1c96125..3f109a3e3edb 100644
--- a/arch/powerpc/include/asm/paca.h
+++ b/arch/powerpc/include/asm/paca.h
@@ -165,7 +165,6 @@ struct paca_struct {
165 u64 saved_msr; /* MSR saved here by enter_rtas */ 165 u64 saved_msr; /* MSR saved here by enter_rtas */
166 u16 trap_save; /* Used when bad stack is encountered */ 166 u16 trap_save; /* Used when bad stack is encountered */
167 u8 irq_soft_mask; /* mask for irq soft masking */ 167 u8 irq_soft_mask; /* mask for irq soft masking */
168 u8 soft_enabled; /* irq soft-enable flag */
169 u8 irq_happened; /* irq happened while soft-disabled */ 168 u8 irq_happened; /* irq happened while soft-disabled */
170 u8 io_sync; /* writel() needs spin_unlock sync */ 169 u8 io_sync; /* writel() needs spin_unlock sync */
171 u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */ 170 u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 9f421641a35c..16b077801a5f 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -91,6 +91,7 @@ extern int start_topology_update(void);
91extern int stop_topology_update(void); 91extern int stop_topology_update(void);
92extern int prrn_is_enabled(void); 92extern int prrn_is_enabled(void);
93extern int find_and_online_cpu_nid(int cpu); 93extern int find_and_online_cpu_nid(int cpu);
94extern int timed_topology_update(int nsecs);
94#else 95#else
95static inline int start_topology_update(void) 96static inline int start_topology_update(void)
96{ 97{
@@ -108,16 +109,12 @@ static inline int find_and_online_cpu_nid(int cpu)
108{ 109{
109 return 0; 110 return 0;
110} 111}
112static inline int timed_topology_update(int nsecs)
113{
114 return 0;
115}
111#endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */ 116#endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */
112 117
113#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_NEED_MULTIPLE_NODES)
114#if defined(CONFIG_PPC_SPLPAR)
115extern int timed_topology_update(int nsecs);
116#else
117#define timed_topology_update(nsecs)
118#endif /* CONFIG_PPC_SPLPAR */
119#endif /* CONFIG_HOTPLUG_CPU || CONFIG_NEED_MULTIPLE_NODES */
120
121#include <asm-generic/topology.h> 118#include <asm-generic/topology.h>
122 119
123#ifdef CONFIG_SMP 120#ifdef CONFIG_SMP