2003-09-08 04:41:17

by Zwane Mwaikambo

[permalink] [raw]
Subject: [PATCH][2.6] arch/arm/mm/tlb-v4wb.S needs to lose a header

Whilst building for an SA1100 i got the following snippets;

AS arch/arm/mm/tlb-v4wb.o
In file included from include/linux/spinlock.h:13,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/mm.h:4,
from include/asm/tlbflush.h:14,
from arch/arm/mm/tlb-v4wb.S:18:
include/linux/kernel.h:32: warning: `ALIGN' redefined
include/linux/linkage.h:24: warning: this is the location of the previous definition
In file included from include/asm/tlbflush.h:14,

In file included from include/asm/tlbflush.h:14,
from arch/arm/mm/tlb-v4wb.S:18:
include/linux/mm.h:87: warning: `VM_EXEC' redefined
include/asm/constants.h:16: warning: this is the location of the previous
definition

Index: linux-2.6.0-test4-mm6-arm/arch/arm/mm/tlb-v4wb.S
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test4-mm6/arch/arm/mm/tlb-v4wb.S,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 tlb-v4wb.S
--- linux-2.6.0-test4-mm6-arm/arch/arm/mm/tlb-v4wb.S 7 Sep 2003 20:26:24 -0000 1.1.1.1
+++ linux-2.6.0-test4-mm6-arm/arch/arm/mm/tlb-v4wb.S 8 Sep 2003 03:56:45 -0000
@@ -15,7 +15,6 @@
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/constants.h>
-#include <asm/tlbflush.h>
#include "proc-macros.S"

.align 5


2003-09-08 07:43:05

by Russell King

[permalink] [raw]
Subject: Re: [PATCH][2.6] arch/arm/mm/tlb-v4wb.S needs to lose a header

On Mon, Sep 08, 2003 at 12:40:10AM -0400, Zwane Mwaikambo wrote:
> Whilst building for an SA1100 i got the following snippets;
>
> AS arch/arm/mm/tlb-v4wb.o
> In file included from include/linux/spinlock.h:13,
> from include/linux/capability.h:45,
> from include/linux/sched.h:7,
> from include/linux/mm.h:4,
> from include/asm/tlbflush.h:14,
> from arch/arm/mm/tlb-v4wb.S:18:
> include/linux/kernel.h:32: warning: `ALIGN' redefined
> include/linux/linkage.h:24: warning: this is the location of the previous definition
> In file included from include/asm/tlbflush.h:14,
>
> In file included from include/asm/tlbflush.h:14,
> from arch/arm/mm/tlb-v4wb.S:18:
> include/linux/mm.h:87: warning: `VM_EXEC' redefined
> include/asm/constants.h:16: warning: this is the location of the previous
> definition

This is caused by including linux/mm.h into asm/tlbflush.h, but it does
show that we don't need asm/tlbflush.h included here.

Same change applied to the other tlb-*.S files, thanks.

--
Russell King ([email protected]) http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
2.6 ARM Linux - http://www.arm.linux.org.uk/
2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core

2003-09-08 07:47:11

by Russell King

[permalink] [raw]
Subject: Re: [PATCH][2.6] arch/arm/mm/tlb-v4wb.S needs to lose a header

On Mon, Sep 08, 2003 at 08:42:58AM +0100, Russell King wrote:
> > In file included from include/asm/tlbflush.h:14,
> > from arch/arm/mm/tlb-v4wb.S:18:
> > include/linux/mm.h:87: warning: `VM_EXEC' redefined
> > include/asm/constants.h:16: warning: this is the location of the previous
> > definition
>
> This is caused by including linux/mm.h into asm/tlbflush.h, but it does
> show that we don't need asm/tlbflush.h included here.

Sorry, you do need asm/tlbflush.h here - we use the various tlb flag
definitions from there in the assembly files to avoid duplicating them.
The solution is not to include linux/mm.h in the first place.

--
Russell King ([email protected]) http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
2.6 ARM Linux - http://www.arm.linux.org.uk/
2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core