Skip to contentSkip to conversation

RM9000 icache problem

PATCH In review Thomas Koeller 2 participants 2 messages Feb 10, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RM9000 icache problem

The code to work around the RM9000 icache problems is wrong and ineffective. The patch below fixes that.

arch/mips/kernel/signal-common.h +1 -1
@@ -176,7 +176,7 @@
 	if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
 		sp = current->sas_ss_sp + current->sas_ss_size;
 
-	return (void *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? 32 : ALMASK));
+	return (void *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK));
 }
 
 static inline int install_sigtramp(unsigned int __user *tramp,
Signature · 9 lines
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================
#1 lore raw
Quoted 2 lines · Thomas Koeller

The code to work around the RM9000 icache problems is wrong and ineffective. The patch below fixes that.

Ah, indeed. Hand applied, as your patch does not apply to the latest kernel.

Thanks,

Ralf