Subject: Invalid constant in entry-armv.S?

From: Alex Holden <[email-masked]>
Date: Mon, 7 Dec 1998 20:48:27 +0000 (GMT)

I just tried to compile Russell's 2.1.131-19981206-2 kernel on the
NetWinder, but the compilation fails with:

entry-armv.S: Assembler messages:
entry-armv.S:645: Error: Invalid constant
entry-armv.S:664: Error: Invalid constant

Line 645:
1:              get_irqnr_and_base r0, r6, r5

Line 664:
1:              get_irqnr_and_base r0, r6, r5

get_irqnr_and_base seems to be defined in line 237:
		.macro get_irqnr_and_base, irqnr, irqstat, base

I'm afraid I don't know enough about the AS syntax to be sure what it's
choking on. Is it a bug in the Corel assembler (I think I have the latest
one they've released) or is there really something wrong with this code?

--------------- Linux- the choice of a GNU generation. --------------
: Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :
-------------------- http://www.linuxhacker.org/ --------------------

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Philip Blundell <[email-masked]>
Date: Tue, 08 Dec 1998 14:24:32 +0100

>one they've released) or is there really something wrong with this code?

The latter.  I think this is roughly what I had to do to make that kernel 
compile for a netwinder target.

p.

diff -u --recursive --new-file clean/linux/arch/arm/kernel/Makefile linux/arch/arm/kernel/Makefile
--- clean/linux/arch/arm/kernel/Makefile	Mon Dec  7 13:09:18 1998
+++ linux/arch/arm/kernel/Makefile	Tue Dec  8 13:58:56 1998
@@ -26,7 +26,8 @@
 O_OBJS_ebsa110    = leds-ebsa110.o
 O_OBJS_ebsa285    = leds-ebsa285.o hw-ebsa285.o
 O_OBJS_nexuspci   =
-O_OBJS_vnc        = leds-ebsa285.o hw-vnc.o
+O_OBJS_vnc        = leds-ebsa285.o
+OX_OBJS_vnc	  = hw-vnc.o
 
 all: lib kernel.o $(HEAD_OBJ) init_task.o
 
@@ -57,6 +58,7 @@
 endif
 
 O_OBJS += $(O_OBJS_$(MACHINE))
+OX_OBJS += $(OX_OBJS_$(MACHINE))
 
 $(HEAD_OBJ): $(HEAD_OBJ:.o=.S)
 	$(CC) -D__ASSEMBLY__ -DTEXTADDR=$(TEXTADDR) -traditional -c $(HEAD_OBJ:.o=.S) -o $@
diff -u --recursive --new-file clean/linux/arch/arm/kernel/entry-armv.S linux/arch/arm/kernel/entry-armv.S
--- clean/linux/arch/arm/kernel/entry-armv.S	Mon Dec  7 13:09:18 1998
+++ linux/arch/arm/kernel/entry-armv.S	Tue Dec  8 13:51:05 1998
@@ -269,7 +298,8 @@
 		b	1001f
 
 1002:		@ PCI errors
-		tst	\irqstat, #IRQ_MASK_PCI_ERR
+		tst	\irqstat, #IRQ_MASK_PCI_ERR_LO
+		tsteq	\irqstat, #IRQ_MASK_PCI_ERR_HI
 		movne	\irqnr, #IRQ_PCI_ERR
 		bne	1001f
 
diff -u --recursive --new-file clean/linux/include/asm-arm/arch-vnc/irqs.h linux/include/asm-arm/arch-vnc/irqs.h
--- clean/linux/include/asm-arm/arch-vnc/irqs.h	Mon Dec  7 13:10:23 1998
+++ linux/include/asm-arm/arch-vnc/irqs.h	Tue Dec  8 13:50:26 1998
@@ -53,6 +53,8 @@
 #define IRQ_MASK_EXTERN_IRQ	0x00000800
 #define IRQ_MASK_DMA1		0x00030000
 #define IRQ_MASK_PCI_ERR	0xf8800000
+#define IRQ_MASK_PCI_ERR_LO	0x00800000
+#define IRQ_MASK_PCI_ERR_HI	0xf8000000
 
 /*
  * Now map them to the Linux interrupts