2009-04-16 15:08:57

by Christoph Hellwig

[permalink] [raw]
Subject: last remaining asm/ header moves: h8300 and m32r

Hello,

h8300 and m32r are the last two architectures still having their asm/
headers in include/ instead of arch/$arch/include. Any chance you could
do the move for 2.6.30 so we're only left with one way of doing it?


2009-04-16 16:39:22

by Sam Ravnborg

[permalink] [raw]
Subject: Re: last remaining asm/ header moves: h8300 and m32r

On Thu, Apr 16, 2009 at 05:07:07PM +0200, Christoph Hellwig wrote:
> Hello,
>
> h8300 and m32r are the last two architectures still having their asm/
> headers in include/ instead of arch/$arch/include. Any chance you could
> do the move for 2.6.30 so we're only left with one way of doing it?

h8300 only have one file let in asm-h8300 by mistake.
I got OK to send a patch for this so will do so tonight.

And I also pinged privately for m32r - and I recall I did so in the past too.
If I see no response real soon I will just ask Linus
to do the move as it is straightforward.

Sam

2009-04-16 16:51:19

by Arnd Bergmann

[permalink] [raw]
Subject: Re: last remaining asm/ header moves: h8300 and m32r

On Thursday 16 April 2009, Christoph Hellwig wrote:

> h8300 and m32r are the last two architectures still having their asm/
> headers in include/ instead of arch/$arch/include. Any chance you could
> do the move for 2.6.30 so we're only left with one way of doing it?

Seconded. Note that Linus has already done the move himself for
h8300 back in August, but a new timer.h file was added in a patch
that got merged at the same time, so the directory is there again,
with a single file in it.

Arnd <><

2009-04-17 02:25:19

by Hirokazu Takata

[permalink] [raw]
Subject: [GIT PULL] m32r: move include/asm-m32r to arch/m32r/include/asm

Hello, Linus, and folks,

> And I also pinged privately for m32r - and I recall I did so in the past too.
Sorry for the delay in responding. >> Sam

I have moved asm-m32r headers and build-checked.

Please pull from the following m32r git tree:
git://http://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus

---
Hirokazu Takata (2):
m32r: move include/asm-m32r headers to arch/m32r/include/asm
m32r: move include/asm-m32r/* to arch/m32r/include/asm/

commit 78a49990269a539fc77e9a669d9e74e1dfaec657
Author: Hirokazu Takata <[email protected]>
Date: Fri Apr 17 10:46:25 2009 +0900

m32r: move include/asm-m32r/* to arch/m32r/include/asm/

Move remained files, ftrace.h and swab.h, to arch/m32r/include/asm/.

Signed-off-by: Hirokazu Takata <[email protected]>

commit fe4e719d82c4052751d2287de4bd18bd04e93685
Author: Hirokazu Takata <[email protected]>
Date: Fri Nov 28 02:46:48 2008 +0900

m32r: move include/asm-m32r headers to arch/m32r/include/asm

Signed-off-by: Hirokazu Takata <[email protected]>

From: Sam Ravnborg <[email protected]>
Subject: Re: last remaining asm/ header moves: h8300 and m32r
Date: Thu, 16 Apr 2009 18:40:50 +0200
> On Thu, Apr 16, 2009 at 05:07:07PM +0200, Christoph Hellwig wrote:
> > Hello,
> >
> > h8300 and m32r are the last two architectures still having their asm/
> > headers in include/ instead of arch/$arch/include. Any chance you could
> > do the move for 2.6.30 so we're only left with one way of doing it?
>
> h8300 only have one file let in asm-h8300 by mistake.
> I got OK to send a patch for this so will do so tonight.
>
> And I also pinged privately for m32r - and I recall I did so in the past too.
> If I see no response real soon I will just ask Linus
> to do the move as it is straightforward.
>
> Sam
>

-- Takata

2009-04-17 17:44:58

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT PULL] m32r: move include/asm-m32r to arch/m32r/include/asm



On Fri, 17 Apr 2009, [email protected] wrote:
>
> I have moved asm-m32r headers and build-checked.
>
> Please pull from the following m32r git tree:
> git://http://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus

Ok, pulled.

I also removed the last remnants of asm-h8300 (a file that was added after
the more of everything else) and asm-arm (a stale .gitignore file).

So now the only thing left is the build-time include/asm-$(ARCH)
generation usually for just that "<asm/asm-offsets.h> file.

Oh, and the "asm -> asm-$(ARCH)" symlink that the asm-offsets.h thing
brings with it.

There may be other auto-generated cases, of course, asm-offsets.h is the
only one I happen to see during my regular x86-64 build.

Linus

2009-04-17 22:12:59

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [GIT PULL] m32r: move include/asm-m32r to arch/m32r/include/asm

On Fri, Apr 17, 2009 at 10:37:42AM -0700, Linus Torvalds wrote:
>
>
> On Fri, 17 Apr 2009, [email protected] wrote:
> >
> > I have moved asm-m32r headers and build-checked.
> >
> > Please pull from the following m32r git tree:
> > git://http://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus
>
> Ok, pulled.
>
> I also removed the last remnants of asm-h8300 (a file that was added after
> the more of everything else) and asm-arm (a stale .gitignore file).

It was not stale as arm create a few files in asm-arm so it
just ignored a few generated files.

I have discussed wth Al to introduce a new directory:

include/gen/

that will hold all such generated files including asm-offsets.h.
When I have this ready the asm -> asm-$(ARCH) symlink will die.

Do not bring back the asm-arm/.gitignore,
we will live with that until include/gen are in place.

Sam

2009-04-18 10:16:19

by Russell King

[permalink] [raw]
Subject: Re: [GIT PULL] m32r: move include/asm-m32r to arch/m32r/include/asm

On Sat, Apr 18, 2009 at 12:14:40AM +0200, Sam Ravnborg wrote:
> It was not stale as arm create a few files in asm-arm so it
> just ignored a few generated files.
>
> I have discussed wth Al to introduce a new directory:
>
> include/gen/
>
> that will hold all such generated files including asm-offsets.h.
> When I have this ready the asm -> asm-$(ARCH) symlink will die.
>
> Do not bring back the asm-arm/.gitignore,
> we will live with that until include/gen are in place.

We're going to get include/asm-arm/mach-types.h committed via someone
elses tree sooner or later then, unless include/gen or whatever comes
in ASAP.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:

2009-04-18 18:15:27

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH] arm: use include/gen for mach-types.h

mach-types.h is a generated file.
As we no longer has a .gitignore file in asm-arm the risk
that somebody by accident commit mach-types.h is big.

Avoid this by the introduction of include/gen/ to
hold this (and soon other) generated files.

The patch includes two small cleanups to arch/arm/Makefile.
1) delete stale comment
2) combine two targets in one line and drop unused prerequisite

The idea to introduce include/gen/ is originally from Al Viro.

Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Al Viro <[email protected]>
---

Hi Russell.
This patch is _not_ tested - as I have yet to get the
arm toolchain operational.
But it looks trivial correct.

Please consider applying.

Sam

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e84729b..b50dfa0 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -214,15 +214,9 @@ all: $(KBUILD_IMAGE)

boot := arch/arm/boot

-# Update machine arch and proc symlinks if something which affects
-# them changed. We use .arch to indicate when they were updated
-# last, otherwise make uses the target directory mtime.
-
-archprepare: maketools
-
PHONY += maketools FORCE
-maketools: include/linux/version.h FORCE
- $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
+archprepare maketools:
+ $(Q)$(MAKE) $(build)=arch/arm/tools include/gen/mach-types.h

# Convert bzImage to zImage
bzImage: zImage
@@ -233,8 +227,7 @@ zImage Image xipImage bootpImage uImage: vmlinux
zinstall install: vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@

-CLEAN_FILES += include/asm-arm/mach-types.h \
- include/asm-arm/arch include/asm-arm/.arch
+CLEAN_FILES += include/gen/mach-types.h

# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h
new file mode 100644
index 0000000..e6fcab7
--- /dev/null
+++ b/arch/arm/include/asm/mach-types.h
@@ -0,0 +1,4 @@
+# mach-types is the list of machine types supported by arm
+# This file allow us to use: <asm/mach-types.h> when including mach-types
+
+#incude <gen/mach-types.h>
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index 1dbaa29..63a6aae 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -4,7 +4,7 @@
# Copyright (C) 2001 Russell King
#

-include/asm-arm/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
+include/gen/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
@echo ' Generating $@'
@mkdir -p $(dir $@)
$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/include/gen/.gitignore b/include/gen/.gitignore
new file mode 100644
index 0000000..1e809fd
--- /dev/null
+++ b/include/gen/.gitignore
@@ -0,0 +1,2 @@
+# mach-types.h is used by arm
+mach-types.h

2009-04-18 18:58:53

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] arm: use include/gen for mach-types.h

On Sat, Apr 18, 2009 at 08:17:14PM +0200, Sam Ravnborg wrote:
> mach-types.h is a generated file.
> As we no longer has a .gitignore file in asm-arm the risk
> that somebody by accident commit mach-types.h is big.
>
> Avoid this by the introduction of include/gen/ to
> hold this (and soon other) generated files.
>
> The patch includes two small cleanups to arch/arm/Makefile.
> 1) delete stale comment
> 2) combine two targets in one line and drop unused prerequisite
>
> The idea to introduce include/gen/ is originally from Al Viro.

Umm...
a) why CLEAN_FILES and not MRPROPER_FILES?
b) I'd simply add include/gen to MRPROPER_FILES in the top-level
Makefile.
c) .gitignore in there ought to be simply *, if we want to create
.gitignore there at all (we don't do that for include/config and the
world doesn't end, after all).

2009-04-18 19:33:56

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH] arm: use include/gen for mach-types.h



On Sat, 18 Apr 2009, Sam Ravnborg wrote:
>
> diff --git a/include/gen/.gitignore b/include/gen/.gitignore
> new file mode 100644
> index 0000000..1e809fd
> --- /dev/null
> +++ b/include/gen/.gitignore
> @@ -0,0 +1,2 @@
> +# mach-types.h is used by arm
> +mach-types.h

I think this is bad.

The whole point of having 'include/gen' should be that _all_ files in that
directory should be generated. So it should be include/.gitignore that
just contains the pattern "gen/" and that's it.

That said, I also dislike "gen" as a name. To me, it is more likely to
mean "generation" in the sense of father/son/grandson than "generated".
Why not spell it out?

Linus

2009-04-18 19:53:36

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH v2] arm: use include/gen for mach-types.h

mach-types.h is a generated file.
As we no longer has a .gitignore file in asm-arm the risk
that somebody by accident commit mach-types.h is big.

Avoid this by the introduction of include/generated/ to
hold this (and soon other) generated files.

The patch includes two small cleanups to arch/arm/Makefile.
1) delete stale comment
2) combine two targets in one line and drop unused prerequisite

The idea to introduce include/generated/ is originally from Al Viro.

This is the first user of include/generated and therefore this
patch include changes in top-level Makefile and top-level
.gitignore to support include/generated

Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Al Viro <[email protected]>
---

This patch addresses comments by Al and Linus:
- use include/generated/
- just ignore all of include/generated
- remove include/generated directory in make mrproper

Sam

diff --git a/.gitignore b/.gitignore
index 869e1a3..51bd99d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,7 @@ include/linux/compile.h
include/linux/version.h
include/linux/utsrelease.h
include/linux/bounds.h
+include/generated

# stgit generated dirs
patches-*
diff --git a/Makefile b/Makefile
index bfdef56..6f4208f 100644
--- a/Makefile
+++ b/Makefile
@@ -1200,7 +1200,7 @@ CLEAN_FILES += vmlinux System.map \
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map

# Directories & files removed with 'make mrproper'
-MRPROPER_DIRS += include/config include2 usr/include
+MRPROPER_DIRS += include/config include2 usr/include include/generated
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/linux/autoconf.h include/linux/version.h \
include/linux/utsrelease.h \
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e84729b..1bedda1 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -214,15 +214,9 @@ all: $(KBUILD_IMAGE)

boot := arch/arm/boot

-# Update machine arch and proc symlinks if something which affects
-# them changed. We use .arch to indicate when they were updated
-# last, otherwise make uses the target directory mtime.
-
-archprepare: maketools
-
PHONY += maketools FORCE
-maketools: include/linux/version.h FORCE
- $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
+archprepare maketools:
+ $(Q)$(MAKE) $(build)=arch/arm/tools include/generated/mach-types.h

# Convert bzImage to zImage
bzImage: zImage
@@ -233,9 +227,6 @@ zImage Image xipImage bootpImage uImage: vmlinux
zinstall install: vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@

-CLEAN_FILES += include/asm-arm/mach-types.h \
- include/asm-arm/arch include/asm-arm/.arch
-
# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h
new file mode 100644
index 0000000..b44d1a1
--- /dev/null
+++ b/arch/arm/include/asm/mach-types.h
@@ -0,0 +1,4 @@
+# mach-types is the list of machine types supported by arm
+# This file allow us to use: <asm/mach-types.h> when including mach-types
+
+#include <generated/mach-types.h>
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index 1dbaa29..635cb18 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -4,7 +4,7 @@
# Copyright (C) 2001 Russell King
#

-include/asm-arm/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
+include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
@echo ' Generating $@'
@mkdir -p $(dir $@)
$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }

2009-04-18 20:53:51

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] arm: use include/gen for mach-types.h

On Sat, Apr 18, 2009 at 12:28:51PM -0700, Linus Torvalds wrote:
>
>
> On Sat, 18 Apr 2009, Sam Ravnborg wrote:
> >
> > diff --git a/include/gen/.gitignore b/include/gen/.gitignore
> > new file mode 100644
> > index 0000000..1e809fd
> > --- /dev/null
> > +++ b/include/gen/.gitignore
> > @@ -0,0 +1,2 @@
> > +# mach-types.h is used by arm
> > +mach-types.h
>
> I think this is bad.
>
> The whole point of having 'include/gen' should be that _all_ files in that
> directory should be generated. So it should be include/.gitignore that
> just contains the pattern "gen/" and that's it.

Or .gitignore in top-level, same as for include/config