CVSROOT: /home/cvs
Module name: malta
Changes by: chris@ftp.linux-mips.org 05/01/18 18:02:41
Modified files:
linux/include/asm-mips: Tag: MaltaRef_2_6 hazards.h
Log message:
Use macro for ehb instruction. for use with older compilers. Fix
ssnop macro encoding.
diff -urN malta/linux/include/asm-mips/hazards.h
malta/linux/include/asm-mips/hazards.h
--- malta/linux/include/asm-mips/hazards.h 2004/09/14 16:29:26
1.3.1000.2
+++ malta/linux/include/asm-mips/hazards.h 2005/01/18 18:02:41
1.3.1000.3
@@ -13,7 +13,11 @@
#ifdef __ASSEMBLY__
.macro _ssnop
- sll $0, $2, 1
+ sll $0, $0, 1
+ .endm
+
+ .macro _ehb
+ sll $0, $0, 3
.endm
/*
@@ -60,10 +64,10 @@
* Use ehb to clear hazard when manipulating the status register
*/
#define irq_enable_hazard \
- ehb # irq_enable_hazard
+ _ehb # irq_enable_hazard
#define irq_disable_hazard \
- ehb # irq_disable_hazard
+ _ehb # irq_disable_hazard
#elif defined(CONFIG_CPU_R10000)
@@ -140,13 +144,23 @@
*/
__asm__ (
+ ".macro\t_ssnop\n\t"
+ "sll\t$0, $0, 1\n\t"
+ ".endm");
+
+__asm__ (
+ ".macro\t_ehb\n\t"
+ "sll\t$0, $0, 3\n\t"
+ ".endm");
+
+__asm__ (
".macro\tirq_enable_hazard\n\t"
- "ehb\n\t"
+ "_ehb\n\t"
".endm");
__asm__ (
".macro\tirq_disable_hazard\n\t"
- "ehb\n\t"
+ "_ehb\n\t"
".endm");
#define irq_enable_hazard() \
@@ -185,9 +199,13 @@
__asm__(
" .macro _ssnop \n\t"
- " sll $0, $2, 1 \n\t"
+ " sll $0, $0, 1 \n\t"
" .endm \n\t"
" \n\t"
+ " .macro _ehb \n\t"
+ " sll $0, $0, 3 \n\t"
+ " .endm \n\t");
+ " \n\t"
" # \n\t"
" # There is a hazard but we do not care \n\t"
" # \n\t"
|