aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2015-12-12 12:22:03 -0500
committerHelge Deller <deller@gmx.de>2016-01-12 16:03:36 -0500
commitfc6325750348272d10a8e39adb9fc0e89a667774 (patch)
tree6325d652427aa9928459319badd834d45836b095
parent602c9c9a01a4f0ef091295ac75c74c7fe94d69a4 (diff)
parisc: Reduce overhead of parisc_requires_coherency()
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--arch/parisc/include/asm/processor.h17
-rw-r--r--arch/parisc/kernel/processor.c10
2 files changed, 17 insertions, 10 deletions
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h
index 7e759ecb1343..2e674e13e005 100644
--- a/arch/parisc/include/asm/processor.h
+++ b/arch/parisc/include/asm/processor.h
@@ -311,18 +311,17 @@ extern unsigned long get_wchan(struct task_struct *p);
311#define cpu_relax() barrier() 311#define cpu_relax() barrier()
312#define cpu_relax_lowlatency() cpu_relax() 312#define cpu_relax_lowlatency() cpu_relax()
313 313
314/* Used as a macro to identify the combined VIPT/PIPT cached 314/*
315 * CPUs which require a guarantee of coherency (no inequivalent 315 * parisc_requires_coherency() is used to identify the combined VIPT/PIPT
316 * aliases with different data, whether clean or not) to operate */ 316 * cached CPUs which require a guarantee of coherency (no inequivalent aliases
317static inline int parisc_requires_coherency(void) 317 * with different data, whether clean or not) to operate
318{ 318 */
319#ifdef CONFIG_PA8X00 319#ifdef CONFIG_PA8X00
320 return (boot_cpu_data.cpu_type == mako) || 320extern int _parisc_requires_coherency;
321 (boot_cpu_data.cpu_type == mako2); 321#define parisc_requires_coherency() _parisc_requires_coherency
322#else 322#else
323 return 0; 323#define parisc_requires_coherency() (0)
324#endif 324#endif
325}
326 325
327#endif /* __ASSEMBLY__ */ 326#endif /* __ASSEMBLY__ */
328 327
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index b68d977ce30f..e81ccf1716e9 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -44,6 +44,10 @@
44 44
45struct system_cpuinfo_parisc boot_cpu_data __read_mostly; 45struct system_cpuinfo_parisc boot_cpu_data __read_mostly;
46EXPORT_SYMBOL(boot_cpu_data); 46EXPORT_SYMBOL(boot_cpu_data);
47#ifdef CONFIG_PA8X00
48int _parisc_requires_coherency __read_mostly;
49EXPORT_SYMBOL(_parisc_requires_coherency);
50#endif
47 51
48DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data); 52DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data);
49 53
@@ -277,8 +281,12 @@ void __init collect_boot_cpu_data(void)
277 boot_cpu_data.cpu_type = parisc_get_cpu_type(boot_cpu_data.hversion); 281 boot_cpu_data.cpu_type = parisc_get_cpu_type(boot_cpu_data.hversion);
278 boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0]; 282 boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0];
279 boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1]; 283 boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1];
280}
281 284
285#ifdef CONFIG_PA8X00
286 _parisc_requires_coherency = (boot_cpu_data.cpu_type == mako) ||
287 (boot_cpu_data.cpu_type == mako2);
288#endif
289}
282 290
283 291
284/** 292/**