PPC64 sparse fixes for cpu feature constants
PATCH 1/1 PPC64 sparse fixes for cpu feature constants
This patch is originally from Nathan Lynch <[email protected]>.
Sparse gives a warning "constant ... is so big it is long" for every expression where we check bits in the cur_cpu_spec->cpu_features value. This patch removes the warnings by using the ASM_CONST macro.
Signed-off-by Nathan Lynch <[email protected]>
Signed-off-by Paul Mackerras <[email protected]>
include/asm-ppc64/cacheflush.h +1 -1
@@ -40,7 +40,7 @@static inline void flush_icache_range (unsigned long start,unsigned long stop) { -if (!(cur_cpu_spec->cpu_features &ASM_CONST (CPU_FTR_COHERENT_ICACHE ))) +if (!(cur_cpu_spec->cpu_features &CPU_FTR_COHERENT_ICACHE ))__flush_icache_range (start, stop); }
include/asm-ppc64/cputable.h +29 -28
73 lines not on this page · raw message
include/asm-ppc64/mmu_context.h +5 -8
@@ -51,14 +51,6 @@static inline void switch_mm (struct mm_struct *prev,struct mm_struct *next,struct task_struct *tsk) { -#ifdef CONFIG_ALTIVEC - asmvolatile ( -BEGIN_FTR_SECTION -"dssall;\n" - END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) - : : ); -#endif /* CONFIG_ALTIVEC */ -if (!cpu_isset (smp_processor_id (), next->cpu_vm_mask))cpu_set (smp_processor_id (), next->cpu_vm_mask);
@@ -66,6 +58,11 @@if (prev == next)return ; +#ifdef CONFIG_ALTIVEC +if (cur_cpu_spec->cpu_features &CPU_FTR_ALTIVEC ) + asmvolatile ("dssall" ); +#endif /* CONFIG_ALTIVEC */ +if (cur_cpu_spec->cpu_features &CPU_FTR_SLB )switch_slb (tsk, next);else