Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: Reduce overhead of parisc_requires_coherency()

Signed-off-by: Helge Deller <deller@gmx.de>

+17 -10
+8 -9
arch/parisc/include/asm/processor.h
··· 311 311 #define cpu_relax() barrier() 312 312 #define cpu_relax_lowlatency() cpu_relax() 313 313 314 - /* Used as a macro to identify the combined VIPT/PIPT cached 315 - * CPUs which require a guarantee of coherency (no inequivalent 316 - * aliases with different data, whether clean or not) to operate */ 317 - static inline int parisc_requires_coherency(void) 318 - { 314 + /* 315 + * parisc_requires_coherency() is used to identify the combined VIPT/PIPT 316 + * cached CPUs which require a guarantee of coherency (no inequivalent aliases 317 + * with different data, whether clean or not) to operate 318 + */ 319 319 #ifdef CONFIG_PA8X00 320 - return (boot_cpu_data.cpu_type == mako) || 321 - (boot_cpu_data.cpu_type == mako2); 320 + extern int _parisc_requires_coherency; 321 + #define parisc_requires_coherency() _parisc_requires_coherency 322 322 #else 323 - return 0; 323 + #define parisc_requires_coherency() (0) 324 324 #endif 325 - } 326 325 327 326 #endif /* __ASSEMBLY__ */ 328 327
+9 -1
arch/parisc/kernel/processor.c
··· 44 44 45 45 struct system_cpuinfo_parisc boot_cpu_data __read_mostly; 46 46 EXPORT_SYMBOL(boot_cpu_data); 47 + #ifdef CONFIG_PA8X00 48 + int _parisc_requires_coherency __read_mostly; 49 + EXPORT_SYMBOL(_parisc_requires_coherency); 50 + #endif 47 51 48 52 DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data); 49 53 ··· 281 277 boot_cpu_data.cpu_type = parisc_get_cpu_type(boot_cpu_data.hversion); 282 278 boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0]; 283 279 boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1]; 284 - } 285 280 281 + #ifdef CONFIG_PA8X00 282 + _parisc_requires_coherency = (boot_cpu_data.cpu_type == mako) || 283 + (boot_cpu_data.cpu_type == mako2); 284 + #endif 285 + } 286 286 287 287 288 288 /**