Commit fc632575 authored by Helge Deller's avatar Helge Deller

parisc: Reduce overhead of parisc_requires_coherency()

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 602c9c9a
...@@ -311,18 +311,17 @@ extern unsigned long get_wchan(struct task_struct *p); ...@@ -311,18 +311,17 @@ extern unsigned long get_wchan(struct task_struct *p);
#define cpu_relax() barrier() #define cpu_relax() barrier()
#define cpu_relax_lowlatency() cpu_relax() #define cpu_relax_lowlatency() cpu_relax()
/* Used as a macro to identify the combined VIPT/PIPT cached /*
* CPUs which require a guarantee of coherency (no inequivalent * parisc_requires_coherency() is used to identify the combined VIPT/PIPT
* aliases with different data, whether clean or not) to operate */ * cached CPUs which require a guarantee of coherency (no inequivalent aliases
static inline int parisc_requires_coherency(void) * with different data, whether clean or not) to operate
{ */
#ifdef CONFIG_PA8X00 #ifdef CONFIG_PA8X00
return (boot_cpu_data.cpu_type == mako) || extern int _parisc_requires_coherency;
(boot_cpu_data.cpu_type == mako2); #define parisc_requires_coherency() _parisc_requires_coherency
#else #else
return 0; #define parisc_requires_coherency() (0)
#endif #endif
}
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -44,6 +44,10 @@ ...@@ -44,6 +44,10 @@
struct system_cpuinfo_parisc boot_cpu_data __read_mostly; struct system_cpuinfo_parisc boot_cpu_data __read_mostly;
EXPORT_SYMBOL(boot_cpu_data); EXPORT_SYMBOL(boot_cpu_data);
#ifdef CONFIG_PA8X00
int _parisc_requires_coherency __read_mostly;
EXPORT_SYMBOL(_parisc_requires_coherency);
#endif
DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data); DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data);
...@@ -277,8 +281,12 @@ void __init collect_boot_cpu_data(void) ...@@ -277,8 +281,12 @@ void __init collect_boot_cpu_data(void)
boot_cpu_data.cpu_type = parisc_get_cpu_type(boot_cpu_data.hversion); boot_cpu_data.cpu_type = parisc_get_cpu_type(boot_cpu_data.hversion);
boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0]; boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0];
boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1]; boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1];
}
#ifdef CONFIG_PA8X00
_parisc_requires_coherency = (boot_cpu_data.cpu_type == mako) ||
(boot_cpu_data.cpu_type == mako2);
#endif
}
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment