Subject: new build failed

From: David Kesselring <[email-masked]>
Date: Thu, 30 Oct 2003 12:29:13 -0500 (EST)

I just checked out the latest source from linux-mips and if failed to
compile. Specifically this was a CVS update to a full build I checked out
last month. It shouldn't matter, should it?
Anyway here is the error and the .config file.

mipsel-linux-gcc -D__ASSEMBLY__ -D__KERNEL__
-I/home/dkesselr/stbsw/linux/linux-malta2/include -I
/home/dkesselr/stbsw/linux/linux-malta2/include/asm/gcc -G 0 -mno-abicalls
-fno-pic -pipe   -finline-limit=100000 -mcpu=r4600 -mips2 -Wa,--trap   -c
-o tlbex-mips32.o tlbex-mips32.S
tlbex-mips32.S: Assembler messages:
tlbex-mips32.S:105: Error: Instruction srl requires absolute expression
tlbex-mips32.S:251: Error: Instruction srl requires absolute expression
tlbex-mips32.S:278: Error: Instruction srl requires absolute expression
tlbex-mips32.S:304: Error: Instruction srl requires absolute expression
make[2]: *** [tlbex-mips32.o] Error 1
make[2]: Leaving directory
`/home/dkesselr/stbsw/linux/linux-malta2/arch/mips/mm'
make[1]: *** [first_rule] Error 2

David Kesselring
Atmel MMC
[email-masked]
919-462-6587

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 31 Oct 2003 01:51:22 +0100

> Anyway here is the error and the .config file.

Ah, the one configuration I missed to test ...  Fix below,

  Ralf

Index: arch/mips/mm/tlbex-mips32.S
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/Attic/tlbex-mips32.S,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 tlbex-mips32.S
--- arch/mips/mm/tlbex-mips32.S	28 Mar 2003 19:29:53 -0000	1.1.2.1
+++ arch/mips/mm/tlbex-mips32.S	31 Oct 2003 00:51:06 -0000
@@ -102,7 +102,7 @@
 #endif	
 	nop
 	mfc0	k0, CP0_BADVADDR		# Get faulting address
-	srl	k0, k0, PGDIR_SHIFT		# get pgd only bits
+	srl	k0, k0, _PGDIR_SHIFT		# get pgd only bits
 
 	sll	k0, k0, 2
 	addu	k1, k1, k0			# add in pgd offset
@@ -168,7 +168,7 @@
 #define LOAD_PTE(pte, ptr) \
 	GET_PGD(pte, ptr)          \
 	mfc0	pte, CP0_BADVADDR; \
-	srl	pte, pte, PGDIR_SHIFT; \
+	srl	pte, pte, _PGDIR_SHIFT; \
 	sll	pte, pte, 2; \
 	addu	ptr, ptr, pte; \
 	mfc0	pte, CP0_BADVADDR; \