Skip to contentSkip to conversation

last remaining asm/ header moves: h8300 and m32r

PATCH Superseded Christoph Hellwig 7 participants 12 messages Apr 16, 2009 – Apr 18, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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?

#1 lore raw
Quoted 5 lines · Christoph Hellwig

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

#11 lore raw
In reply to Christoph Hellwig
Quoted 3 lines · Christoph Hellwig

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 <><
#2 lore raw

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

In reply to Sam Ravnborg

Hello, Linus, and folks,

Quoted 1 line

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://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/.

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

From: Sam Ravnborg <[email protected]>
Subject: Re: last remaining asm/ header moves: h8300 and m32r
Date: Thu, 16 Apr 2009 18:40:50 +0200

Quoted 7 lines · Christoph Hellwig
Quoted 5 lines

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?

Quoted 9 lines

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

#3 lore raw

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

Quoted 5 lines · 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://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

#4 lore raw

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

Quoted 6 lines · Linus Torvalds
Quoted 3 lines · On Fri, 17 Apr 2009, [email protected] wrote:

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

Quoted 7 lines
Quoted 2 lines

Please pull from the following m32r git tree:
git://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

#5 lore raw

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

Quoted 5 lines · Sam Ravnborg

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:

Quoted 7 lines

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.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
#6 lore raw

PATCH 1/1 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.

---

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

arch/arm/Makefile +3 -10
index e84729b..b50dfa0 100644
@@ -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:
arch/arm/include/asm/mach-types.h new file +4 -0
new file mode 100644
index 0000000..e6fcab7
@@ -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>
arch/arm/tools/Makefile +1 -1
index 1dbaa29..63a6aae 100644
@@ -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; }
include/gen/.gitignore new file +2 -0
new file mode 100644
index 0000000..1e809fd
@@ -0,0 +1,2 @@
+# mach-types.h is used by arm
+mach-types.h
#7 lore raw

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

Quoted 4 lines · Sam Ravnborg

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.

Quoted 8 lines

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).

#8 lore raw

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

In reply to Sam Ravnborg

include/gen/.gitignore line 2

Quoted 9 lines · Sam Ravnborg
include/gen/.gitignore new file +2 -0
new file mode 100644
index 0000000..1e809fd
@@ -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

#9 lore raw

PATCH v2 1/1 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

---

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

.gitignore +1 -0
index 869e1a3..51bd99d 100644
@@ -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-*
Makefile +1 -1
index bfdef56..6f4208f 100644
@@ -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                            \
arch/arm/Makefile +2 -11
index e84729b..1bedda1 100644
@@ -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)
arch/arm/include/asm/mach-types.h new file +4 -0
new file mode 100644
index 0000000..b44d1a1
@@ -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>
arch/arm/tools/Makefile +1 -1
index 1dbaa29..635cb18 100644
@@ -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; }
#10 lore raw

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

In reply to Linus Torvalds
Quoted 15 lines · Linus Torvalds

include/gen/.gitignore line 2

Quoted 9 lines · Sam Ravnborg
include/gen/.gitignore new file +2 -0
new file mode 100644
index 0000000..1e809fd
@@ -0,0 +1,2 @@
+# mach-types.h is used by arm
+mach-types.h

I think this is bad.

Quoted 3 lines

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