All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] UAPI: Fixes
@ 2012-10-17 14:15 David Howells
  2012-10-17 14:15 ` [PATCH 01/10] uapi: Allow automatic generation of uapi/asm/ header files David Howells
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:15 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel


Hi Linus,

Here are some UAPI fixes for you.  They can be found in git at:

	git://git.infradead.org/users/dhowells/linux-headers.git

on the uapi-fixes branch at the uapi-fixes-20121017 tag.

They do a number of things:

 (1) Import a patch from Catalin Marinas to extend the generic-y in Kbuild
     facility to uapi directories.

 (2) Make arch/tile's ucontext.h file use (1) and remove the header-y line
     from the kernel internal side of things.

 (3) Remove some now-empty conditional bits from include/linux/Kbuild.  The
     contents got moved to the UAPI side of things along with new
     conditionals.

 (4) Deal with now-empty files:

     (a) Empty Kbuild files under include/ get removed.

     (b) Empty Kbuild files under arch/ get comments to hold them as they are
     	 likely to end up with generic-y or genhdr-y lines.  Deleting them
     	 appears to work if we want to go that route.

     (c) Put a comment into uapi/asm-generic/kvm_para.h to prevent the patch
     	 program from deleting that, and made the arches with empty kvm_para.h
     	 uapi files use that instead of having their own files.

     (d) Put comments into four other empty uapi/ headers to prevent the patch
     	 program from deleting them.

A question: Is this the right way to deal with the now-empty Kbuild files?

The ones under include/ are unlikely to be used - even for generated files, I
think - so getting rid of them is probably okay.  Once all the bits are in, we
can probably remove all the Kbuild files under include/ that aren't also under
include/uapi/.

The ones under arch/ are more of an issue because of the potential for
generic-y and genhdr-y.

David
---
Catalin Marinas (1):
      uapi: Allow automatic generation of uapi/asm/ header files

David Howells (9):
      UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
      UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
      UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty
      UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
      UAPI: The tile arch uses the generic ucontext.h file
      UAPI: Place comments in empty arch Kbuilds to make them non-empty
      UAPI: Remove empty non-UAPI Kbuild files
      UAPI: Remove empty conditionals from include/linux/Kbuild
      UAPI: Make uapi/linux/irqnr.h non-empty


 Makefile                                 |    4 +++-
 arch/ia64/include/uapi/asm/Kbuild        |    2 ++
 arch/ia64/include/uapi/asm/kvm_para.h    |    0 
 arch/mips/include/asm/Kbuild             |    1 +
 arch/mn10300/include/uapi/asm/setup.h    |    4 ++++
 arch/s390/include/uapi/asm/Kbuild        |    2 ++
 arch/s390/include/uapi/asm/kvm_para.h    |    0 
 arch/sh/include/uapi/asm/hw_breakpoint.h |    4 ++++
 arch/sparc/include/uapi/asm/sigcontext.h |    4 ++++
 arch/tile/include/arch/Kbuild            |    1 +
 arch/tile/include/asm/Kbuild             |    3 ---
 arch/tile/include/uapi/asm/Kbuild        |    3 +++
 include/Kbuild                           |    4 ----
 include/asm-generic/Kbuild               |    0 
 include/drm/Kbuild                       |    0 
 include/linux/Kbuild                     |   26 --------------------------
 include/linux/byteorder/Kbuild           |    0 
 include/linux/caif/Kbuild                |    0 
 include/linux/can/Kbuild                 |    0 
 include/linux/isdn/Kbuild                |    0 
 include/linux/mmc/Kbuild                 |    0 
 include/linux/netfilter/Kbuild           |    1 -
 include/linux/netfilter/ipset/Kbuild     |    0 
 include/linux/netfilter_arp/Kbuild       |    0 
 include/linux/netfilter_bridge/Kbuild    |    0 
 include/linux/netfilter_ipv4/Kbuild      |    0 
 include/linux/netfilter_ipv6/Kbuild      |    0 
 include/linux/nfsd/Kbuild                |    0 
 include/linux/spi/Kbuild                 |    0 
 include/linux/sunrpc/Kbuild              |    0 
 include/linux/tc_act/Kbuild              |    0 
 include/linux/tc_ematch/Kbuild           |    0 
 include/linux/wimax/Kbuild               |    0 
 include/mtd/Kbuild                       |    0 
 include/uapi/asm-generic/kvm_para.h      |    4 ++++
 include/uapi/linux/irqnr.h               |    4 ++++
 include/xen/Kbuild                       |    0 
 scripts/Makefile.asm-generic             |    2 +-
 38 files changed, 33 insertions(+), 36 deletions(-)
 delete mode 100644 arch/ia64/include/uapi/asm/kvm_para.h
 delete mode 100644 arch/s390/include/uapi/asm/kvm_para.h
 delete mode 100644 include/asm-generic/Kbuild
 delete mode 100644 include/drm/Kbuild
 delete mode 100644 include/linux/byteorder/Kbuild
 delete mode 100644 include/linux/caif/Kbuild
 delete mode 100644 include/linux/can/Kbuild
 delete mode 100644 include/linux/isdn/Kbuild
 delete mode 100644 include/linux/mmc/Kbuild
 delete mode 100644 include/linux/netfilter/Kbuild
 delete mode 100644 include/linux/netfilter/ipset/Kbuild
 delete mode 100644 include/linux/netfilter_arp/Kbuild
 delete mode 100644 include/linux/netfilter_bridge/Kbuild
 delete mode 100644 include/linux/netfilter_ipv4/Kbuild
 delete mode 100644 include/linux/netfilter_ipv6/Kbuild
 delete mode 100644 include/linux/nfsd/Kbuild
 delete mode 100644 include/linux/spi/Kbuild
 delete mode 100644 include/linux/sunrpc/Kbuild
 delete mode 100644 include/linux/tc_act/Kbuild
 delete mode 100644 include/linux/tc_ematch/Kbuild
 delete mode 100644 include/linux/wimax/Kbuild
 delete mode 100644 include/mtd/Kbuild
 delete mode 100644 include/xen/Kbuild


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 01/10] uapi: Allow automatic generation of uapi/asm/ header files
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
@ 2012-10-17 14:15 ` David Howells
  2012-10-17 14:15 ` [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty David Howells
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:15 UTC (permalink / raw)
  To: torvalds
  Cc: dhowells, linux-kernel, Catalin Marinas, David Howells,
	Michal Marek, Arnd Bergmann

From: Catalin Marinas <catalin.marinas@arm.com>

Several arch/*/include/uapi/asm/* header simply include the
corresponding <asm-generic/*> file. This patch allows such files to be
specified in uapi/asm/Kbuild via "generic-y += ..." to be automatically
generated (similar to asm/Kbuild).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
---

 Makefile                     |    4 +++-
 scripts/Makefile.asm-generic |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 5be2ee8..366d0ab 100644
--- a/Makefile
+++ b/Makefile
@@ -437,7 +437,9 @@ endif
 PHONY += asm-generic
 asm-generic:
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
-	            obj=arch/$(SRCARCH)/include/generated/asm
+	            src=asm obj=arch/$(SRCARCH)/include/generated/asm
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
+	            src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm
 
 # To make sure we do not include .config for any of the *config targets
 # catch them early, and hand them over to scripts/kconfig/Makefile
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic
index 40caf3c..d17e0ea 100644
--- a/scripts/Makefile.asm-generic
+++ b/scripts/Makefile.asm-generic
@@ -5,7 +5,7 @@
 # and for each file listed in this file with generic-y creates
 # a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm)
 
-kbuild-file := $(srctree)/arch/$(SRCARCH)/include/asm/Kbuild
+kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild
 -include $(kbuild-file)
 
 include scripts/Kbuild.include


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
  2012-10-17 14:15 ` [PATCH 01/10] uapi: Allow automatic generation of uapi/asm/ header files David Howells
@ 2012-10-17 14:15 ` David Howells
  2012-10-17 14:47   ` Geert Uytterhoeven
  2012-10-17 14:15 ` [PATCH 03/10] UAPI: Remove empty conditionals from include/linux/Kbuild David Howells
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: David Howells @ 2012-10-17 14:15 UTC (permalink / raw)
  To: torvalds
  Cc: dhowells, linux-kernel, David Howells, Randy Dunlap,
	Alessandro Suardi

uapi/linux/irqnr.h was emitted by the UAPI disintegration script as an empty
file because the parent linux/irqnr.h had no UAPI stuff in it, despite being
marked with "header-y".

Unfortunately, the patch program deletes the empty file when applying a kernel
patch.

It's not clear why this file is part of the UAPI at all.  Looking in:

	/usr/include/linux/irqnr.h

there's nothing there but a header reinclusion guard and a comment.

So just stick a comment in there as a placeholder.

Without this, if the kernel is fabricated from, say, a tarball and a patch, you
can get this error when building x86_64 or usermode Linux (and probably
others):

include/linux/irqnr.h:4:30: fatal error: uapi/linux/irqnr.h: No such file or directory

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Alessandro Suardi <alessandro.suardi@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Randy Dunlap <rdunlap@xenotime.net>
cc: Alessandro Suardi <alessandro.suardi@gmail.com>
---

 include/uapi/linux/irqnr.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/irqnr.h b/include/uapi/linux/irqnr.h
index e69de29..ae5704f 100644
--- a/include/uapi/linux/irqnr.h
+++ b/include/uapi/linux/irqnr.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here anymore, but the file must not be empty or patch
+ * will delete it.
+ */


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 03/10] UAPI: Remove empty conditionals from include/linux/Kbuild
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
  2012-10-17 14:15 ` [PATCH 01/10] uapi: Allow automatic generation of uapi/asm/ header files David Howells
  2012-10-17 14:15 ` [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty David Howells
@ 2012-10-17 14:15 ` David Howells
  2012-10-17 14:15 ` [PATCH 04/10] UAPI: Remove empty non-UAPI Kbuild files David Howells
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:15 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel, David Howells

Remove empty conditionals from include/linux/Kbuild as the contents, with new
conditionals, have moved to include/uapi/linux/Kbuild.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 include/linux/Kbuild |   10 ----------
 1 file changed, 10 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 5b57367..7729c58 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -19,13 +19,3 @@ header-y += netfilter_ipv4/
 header-y += netfilter_ipv6/
 header-y += usb/
 header-y += wimax/
-
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
-		  $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
-endif
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
-		  $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),)
-endif
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
-		  $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
-endif


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 04/10] UAPI: Remove empty non-UAPI Kbuild files
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
                   ` (2 preceding siblings ...)
  2012-10-17 14:15 ` [PATCH 03/10] UAPI: Remove empty conditionals from include/linux/Kbuild David Howells
@ 2012-10-17 14:15 ` David Howells
  2012-10-17 14:15 ` [PATCH 05/10] UAPI: Place comments in empty arch Kbuilds to make them non-empty David Howells
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:15 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel, David Howells

Remove non-UAPI Kbuild files that have become empty as a result of UAPI
disintegration.  They used to have only header-y lines in them and those have
now moved to the Kbuild files in the corresponding uapi/ directories.

Possibly these should not be removed but rather have a comment inserted to say
they are intentionally left blank.  This would make it easier to add generated
header lines in future without having to restore the infrastructure.

Note that at this point not all the UAPI disintegration parts have been merged,
so it is likely that more empty Kbuild files will turn up.

It is probably necessary to make the files non-empty to prevent the patch
program from automatically deleting them when it reduces them to nothing.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 include/Kbuild                        |    4 ----
 include/asm-generic/Kbuild            |    0 
 include/drm/Kbuild                    |    0 
 include/linux/Kbuild                  |   16 ----------------
 include/linux/byteorder/Kbuild        |    0 
 include/linux/caif/Kbuild             |    0 
 include/linux/can/Kbuild              |    0 
 include/linux/isdn/Kbuild             |    0 
 include/linux/mmc/Kbuild              |    0 
 include/linux/netfilter/Kbuild        |    1 -
 include/linux/netfilter/ipset/Kbuild  |    0 
 include/linux/netfilter_arp/Kbuild    |    0 
 include/linux/netfilter_bridge/Kbuild |    0 
 include/linux/netfilter_ipv4/Kbuild   |    0 
 include/linux/netfilter_ipv6/Kbuild   |    0 
 include/linux/nfsd/Kbuild             |    0 
 include/linux/spi/Kbuild              |    0 
 include/linux/sunrpc/Kbuild           |    0 
 include/linux/tc_act/Kbuild           |    0 
 include/linux/tc_ematch/Kbuild        |    0 
 include/linux/wimax/Kbuild            |    0 
 include/mtd/Kbuild                    |    0 
 include/xen/Kbuild                    |    0 
 23 files changed, 21 deletions(-)
 delete mode 100644 include/asm-generic/Kbuild
 delete mode 100644 include/drm/Kbuild
 delete mode 100644 include/linux/byteorder/Kbuild
 delete mode 100644 include/linux/caif/Kbuild
 delete mode 100644 include/linux/can/Kbuild
 delete mode 100644 include/linux/isdn/Kbuild
 delete mode 100644 include/linux/mmc/Kbuild
 delete mode 100644 include/linux/netfilter/Kbuild
 delete mode 100644 include/linux/netfilter/ipset/Kbuild
 delete mode 100644 include/linux/netfilter_arp/Kbuild
 delete mode 100644 include/linux/netfilter_bridge/Kbuild
 delete mode 100644 include/linux/netfilter_ipv4/Kbuild
 delete mode 100644 include/linux/netfilter_ipv6/Kbuild
 delete mode 100644 include/linux/nfsd/Kbuild
 delete mode 100644 include/linux/spi/Kbuild
 delete mode 100644 include/linux/sunrpc/Kbuild
 delete mode 100644 include/linux/tc_act/Kbuild
 delete mode 100644 include/linux/tc_ematch/Kbuild
 delete mode 100644 include/linux/wimax/Kbuild
 delete mode 100644 include/mtd/Kbuild
 delete mode 100644 include/xen/Kbuild

diff --git a/include/Kbuild b/include/Kbuild
index 8d226bf..83256b6 100644
--- a/include/Kbuild
+++ b/include/Kbuild
@@ -1,12 +1,8 @@
 # Top-level Makefile calls into asm-$(ARCH)
 # List only non-arch directories below
 
-header-y += asm-generic/
 header-y += linux/
 header-y += sound/
-header-y += mtd/
 header-y += rdma/
 header-y += video/
-header-y += drm/
-header-y += xen/
 header-y += scsi/
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/drm/Kbuild b/include/drm/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 7729c58..7fe2dae 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -1,21 +1,5 @@
-header-y += byteorder/
-header-y += can/
-header-y += caif/
 header-y += dvb/
 header-y += hdlc/
 header-y += hsi/
-header-y += isdn/
-header-y += mmc/
-header-y += nfsd/
 header-y += raid/
-header-y += spi/
-header-y += sunrpc/
-header-y += tc_act/
-header-y += tc_ematch/
-header-y += netfilter/
-header-y += netfilter_arp/
-header-y += netfilter_bridge/
-header-y += netfilter_ipv4/
-header-y += netfilter_ipv6/
 header-y += usb/
-header-y += wimax/
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/caif/Kbuild b/include/linux/caif/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/can/Kbuild b/include/linux/can/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/isdn/Kbuild b/include/linux/isdn/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/mmc/Kbuild b/include/linux/mmc/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
deleted file mode 100644
index b332202..0000000
--- a/include/linux/netfilter/Kbuild
+++ /dev/null
@@ -1 +0,0 @@
-header-y += ipset/
diff --git a/include/linux/netfilter/ipset/Kbuild b/include/linux/netfilter/ipset/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/netfilter_arp/Kbuild b/include/linux/netfilter_arp/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/netfilter_bridge/Kbuild b/include/linux/netfilter_bridge/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/nfsd/Kbuild b/include/linux/nfsd/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/spi/Kbuild b/include/linux/spi/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/sunrpc/Kbuild b/include/linux/sunrpc/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/tc_act/Kbuild b/include/linux/tc_act/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/tc_ematch/Kbuild b/include/linux/tc_ematch/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/linux/wimax/Kbuild b/include/linux/wimax/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/mtd/Kbuild b/include/mtd/Kbuild
deleted file mode 100644
index e69de29..0000000
diff --git a/include/xen/Kbuild b/include/xen/Kbuild
deleted file mode 100644
index e69de29..0000000


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 05/10] UAPI: Place comments in empty arch Kbuilds to make them non-empty
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
                   ` (3 preceding siblings ...)
  2012-10-17 14:15 ` [PATCH 04/10] UAPI: Remove empty non-UAPI Kbuild files David Howells
@ 2012-10-17 14:15 ` David Howells
  2012-10-17 15:42   ` Chris Metcalf
  2012-10-17 14:16 ` [PATCH 06/10] UAPI: The tile arch uses the generic ucontext.h file David Howells
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: David Howells @ 2012-10-17 14:15 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel, David Howells, Ralf Baechle,
	Chris Metcalf

Place comments in:

	arch/mips/include/asm/Kbuild
	arch/tile/include/arch/Kbuild

to make them non-empty so that the patch program doesn't remove them when it
reduces them to nothing.

Possibly they should be just deleted, but it's possible that they'll acquire
generic-y or genhdr-y lines in future, so I'm keeping them around for the
moment.

Note that MIPS will compile happily if the file is deleted instead.  I haven't
tested TILE, but I suspect it will be the same there.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Ralf Baechle <ralf@linux-mips.org>
cc: Chris Metcalf <cmetcalf@tilera.com>
---

 arch/mips/include/asm/Kbuild  |    1 +
 arch/tile/include/arch/Kbuild |    1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index e69de29..533053d 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -0,0 +1 @@
+# MIPS headers
diff --git a/arch/tile/include/arch/Kbuild b/arch/tile/include/arch/Kbuild
index e69de29..3751c9f 100644
--- a/arch/tile/include/arch/Kbuild
+++ b/arch/tile/include/arch/Kbuild
@@ -0,0 +1 @@
+# Tile arch headers


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 06/10] UAPI: The tile arch uses the generic ucontext.h file
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
                   ` (4 preceding siblings ...)
  2012-10-17 14:15 ` [PATCH 05/10] UAPI: Place comments in empty arch Kbuilds to make them non-empty David Howells
@ 2012-10-17 14:16 ` David Howells
  2012-10-17 15:43   ` Chris Metcalf
  2012-10-17 14:16 ` [PATCH 07/10] UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches David Howells
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: David Howells @ 2012-10-17 14:16 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel, David Howells, Chris Metcalf

Move the header-y and generic-y lines for ucontext.h from
arch/tile/include/asm/Kbuild to the uapi/ Kbuild as the asm-generic variant is
used.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Chris Metcalf <cmetcalf@tilera.com>
---

 arch/tile/include/asm/Kbuild      |    3 ---
 arch/tile/include/uapi/asm/Kbuild |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild
index c68808a..6948015 100644
--- a/arch/tile/include/asm/Kbuild
+++ b/arch/tile/include/asm/Kbuild
@@ -1,8 +1,6 @@
 
 header-y += ../arch/
 
-header-y += ucontext.h
-
 generic-y += bug.h
 generic-y += bugs.h
 generic-y += clkdev.h
@@ -37,5 +35,4 @@ generic-y += statfs.h
 generic-y += termbits.h
 generic-y += termios.h
 generic-y += types.h
-generic-y += ucontext.h
 generic-y += xor.h
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild
index 5c6915f..c20db8e 100644
--- a/arch/tile/include/uapi/asm/Kbuild
+++ b/arch/tile/include/uapi/asm/Kbuild
@@ -15,4 +15,7 @@ header-y += siginfo.h
 header-y += signal.h
 header-y += stat.h
 header-y += swab.h
+header-y += ucontext.h
 header-y += unistd.h
+
+generic-y += ucontext.h


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 07/10] UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
                   ` (5 preceding siblings ...)
  2012-10-17 14:16 ` [PATCH 06/10] UAPI: The tile arch uses the generic ucontext.h file David Howells
@ 2012-10-17 14:16 ` David Howells
  2012-10-17 14:16 ` [PATCH 08/10] UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty David Howells
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:16 UTC (permalink / raw)
  To: torvalds
  Cc: dhowells, linux-kernel, David Howells, Arnd Bergmann, Avi Kivity,
	Marcelo Tosatti, kvm

Make uapi/asm-generic/kvm_para.h non-empty by addition of a comment to stop
the patch program from deleting it when it creates it.

Then delete empty arch-specific uapi/asm/kvm_para.h files and tell the Kbuild
files to use the generic instead.

Should this perhaps instead be a #warning or #error that the facility is
unsupported on this arch?

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Arnd Bergmann <arnd@arndb.de>
cc: Avi Kivity <avi@redhat.com>
cc: Marcelo Tosatti <mtosatti@redhat.com>
cc: kvm@vger.kernel.org
---

 arch/ia64/include/uapi/asm/Kbuild     |    2 ++
 arch/ia64/include/uapi/asm/kvm_para.h |    0 
 arch/s390/include/uapi/asm/Kbuild     |    2 ++
 arch/s390/include/uapi/asm/kvm_para.h |    0 
 include/uapi/asm-generic/kvm_para.h   |    4 ++++
 5 files changed, 8 insertions(+)
 delete mode 100644 arch/ia64/include/uapi/asm/kvm_para.h
 delete mode 100644 arch/s390/include/uapi/asm/kvm_para.h

diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild
index 30cafac..1b3f5eb 100644
--- a/arch/ia64/include/uapi/asm/Kbuild
+++ b/arch/ia64/include/uapi/asm/Kbuild
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += kvm_para.h
+
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += break.h
diff --git a/arch/ia64/include/uapi/asm/kvm_para.h b/arch/ia64/include/uapi/asm/kvm_para.h
deleted file mode 100644
index e69de29..0000000
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild
index 7bf68ff..59b67ed 100644
--- a/arch/s390/include/uapi/asm/Kbuild
+++ b/arch/s390/include/uapi/asm/Kbuild
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += kvm_para.h
+
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += byteorder.h
diff --git a/arch/s390/include/uapi/asm/kvm_para.h b/arch/s390/include/uapi/asm/kvm_para.h
deleted file mode 100644
index e69de29..0000000
diff --git a/include/uapi/asm-generic/kvm_para.h b/include/uapi/asm-generic/kvm_para.h
index e69de29..486f0af 100644
--- a/include/uapi/asm-generic/kvm_para.h
+++ b/include/uapi/asm-generic/kvm_para.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here, but the file must not be empty or patch
+ * will delete it.
+ */

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 08/10] UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
                   ` (6 preceding siblings ...)
  2012-10-17 14:16 ` [PATCH 07/10] UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches David Howells
@ 2012-10-17 14:16 ` David Howells
  2012-10-17 14:16   ` David Howells
  2012-10-17 14:16   ` David Howells
  9 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:16 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel, David Howells

arch/mn10300/include/uapi/asm/setup.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 arch/mn10300/include/uapi/asm/setup.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mn10300/include/uapi/asm/setup.h b/arch/mn10300/include/uapi/asm/setup.h
index e69de29..ae5704f 100644
--- a/arch/mn10300/include/uapi/asm/setup.h
+++ b/arch/mn10300/include/uapi/asm/setup.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here anymore, but the file must not be empty or patch
+ * will delete it.
+ */


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 09/10] UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
@ 2012-10-17 14:16   ` David Howells
  2012-10-17 14:15 ` [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty David Howells
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:16 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel

arch/sh/include/uapi/asm/hw_breakpoint.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Paul Mundt <lethal@linux-sh.org>
cc: linux-sh@vger.kernel.org
---

 arch/sh/include/uapi/asm/hw_breakpoint.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/sh/include/uapi/asm/hw_breakpoint.h b/arch/sh/include/uapi/asm/hw_breakpoint.h
index e69de29..ae5704f 100644
--- a/arch/sh/include/uapi/asm/hw_breakpoint.h
+++ b/arch/sh/include/uapi/asm/hw_breakpoint.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here anymore, but the file must not be empty or patch
+ * will delete it.
+ */


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 09/10] UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
@ 2012-10-17 14:16   ` David Howells
  0 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:16 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel, David Howells, Paul Mundt, linux-sh

arch/sh/include/uapi/asm/hw_breakpoint.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Paul Mundt <lethal@linux-sh.org>
cc: linux-sh@vger.kernel.org
---

 arch/sh/include/uapi/asm/hw_breakpoint.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/sh/include/uapi/asm/hw_breakpoint.h b/arch/sh/include/uapi/asm/hw_breakpoint.h
index e69de29..ae5704f 100644
--- a/arch/sh/include/uapi/asm/hw_breakpoint.h
+++ b/arch/sh/include/uapi/asm/hw_breakpoint.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here anymore, but the file must not be empty or patch
+ * will delete it.
+ */


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 10/10] UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
  2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
@ 2012-10-17 14:16   ` David Howells
  2012-10-17 14:15 ` [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty David Howells
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:16 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel

arch/sparc/include/uapi/asm/sigcontext.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: David S. Miller <davem@davemloft.net>
cc: sparclinux@vger.kernel.org
---

 arch/sparc/include/uapi/asm/sigcontext.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/sparc/include/uapi/asm/sigcontext.h b/arch/sparc/include/uapi/asm/sigcontext.h
index e69de29..ae5704f 100644
--- a/arch/sparc/include/uapi/asm/sigcontext.h
+++ b/arch/sparc/include/uapi/asm/sigcontext.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here anymore, but the file must not be empty or patch
+ * will delete it.
+ */


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 10/10] UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
@ 2012-10-17 14:16   ` David Howells
  0 siblings, 0 replies; 16+ messages in thread
From: David Howells @ 2012-10-17 14:16 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel, David Howells, David S. Miller,
	sparclinux

arch/sparc/include/uapi/asm/sigcontext.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: David S. Miller <davem@davemloft.net>
cc: sparclinux@vger.kernel.org
---

 arch/sparc/include/uapi/asm/sigcontext.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/sparc/include/uapi/asm/sigcontext.h b/arch/sparc/include/uapi/asm/sigcontext.h
index e69de29..ae5704f 100644
--- a/arch/sparc/include/uapi/asm/sigcontext.h
+++ b/arch/sparc/include/uapi/asm/sigcontext.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here anymore, but the file must not be empty or patch
+ * will delete it.
+ */


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty
  2012-10-17 14:15 ` [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty David Howells
@ 2012-10-17 14:47   ` Geert Uytterhoeven
  0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2012-10-17 14:47 UTC (permalink / raw)
  To: David Howells; +Cc: torvalds, linux-kernel, Randy Dunlap, Alessandro Suardi

On Wed, Oct 17, 2012 at 4:15 PM, David Howells <dhowells@redhat.com> wrote:
> uapi/linux/irqnr.h was emitted by the UAPI disintegration script as an empty
> file because the parent linux/irqnr.h had no UAPI stuff in it, despite being
> marked with "header-y".

> --- a/include/uapi/linux/irqnr.h
> +++ b/include/uapi/linux/irqnr.h
> @@ -0,0 +1,4 @@
> +/*
> + * There isn't anything here anymore, but the file must not be empty or patch
> + * will delete it.
> + */

Wouldn't it be better to just have include guards in those otherwise
empty files?

If someone needs to add something to such a file, the include guards are needed
anyway (but may be forgotten), and the comment should be deleted as well
(which may also be forgotten).

BTW, is "#pragma once" allowed these days? It seems we already have one
user in drivers/staging/bcm/CmHost.h.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 05/10] UAPI: Place comments in empty arch Kbuilds to make them non-empty
  2012-10-17 14:15 ` [PATCH 05/10] UAPI: Place comments in empty arch Kbuilds to make them non-empty David Howells
@ 2012-10-17 15:42   ` Chris Metcalf
  0 siblings, 0 replies; 16+ messages in thread
From: Chris Metcalf @ 2012-10-17 15:42 UTC (permalink / raw)
  To: David Howells; +Cc: torvalds, linux-kernel, Ralf Baechle

On 10/17/2012 10:15 AM, David Howells wrote:
> Place comments in:
>
> 	arch/mips/include/asm/Kbuild
> 	arch/tile/include/arch/Kbuild
>
> to make them non-empty so that the patch program doesn't remove them when it
> reduces them to nothing.
>
> Possibly they should be just deleted, but it's possible that they'll acquire
> generic-y or genhdr-y lines in future, so I'm keeping them around for the
> moment.
>
> Note that MIPS will compile happily if the file is deleted instead.  I haven't
> tested TILE, but I suspect it will be the same there.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Ralf Baechle <ralf@linux-mips.org>
> cc: Chris Metcalf <cmetcalf@tilera.com>

Acked-by: Chris Metcalf <cmetcalf@tilera.com>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 06/10] UAPI: The tile arch uses the generic ucontext.h file
  2012-10-17 14:16 ` [PATCH 06/10] UAPI: The tile arch uses the generic ucontext.h file David Howells
@ 2012-10-17 15:43   ` Chris Metcalf
  0 siblings, 0 replies; 16+ messages in thread
From: Chris Metcalf @ 2012-10-17 15:43 UTC (permalink / raw)
  To: David Howells; +Cc: torvalds, linux-kernel

On 10/17/2012 10:16 AM, David Howells wrote:
> Move the header-y and generic-y lines for ucontext.h from
> arch/tile/include/asm/Kbuild to the uapi/ Kbuild as the asm-generic variant is
> used.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Chris Metcalf <cmetcalf@tilera.com>

Acked-by: Chris Metcalf <cmetcalf@tilera.com>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-10-17 15:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 14:15 [PATCH 00/10] UAPI: Fixes David Howells
2012-10-17 14:15 ` [PATCH 01/10] uapi: Allow automatic generation of uapi/asm/ header files David Howells
2012-10-17 14:15 ` [PATCH 02/10] UAPI: Make uapi/linux/irqnr.h non-empty David Howells
2012-10-17 14:47   ` Geert Uytterhoeven
2012-10-17 14:15 ` [PATCH 03/10] UAPI: Remove empty conditionals from include/linux/Kbuild David Howells
2012-10-17 14:15 ` [PATCH 04/10] UAPI: Remove empty non-UAPI Kbuild files David Howells
2012-10-17 14:15 ` [PATCH 05/10] UAPI: Place comments in empty arch Kbuilds to make them non-empty David Howells
2012-10-17 15:42   ` Chris Metcalf
2012-10-17 14:16 ` [PATCH 06/10] UAPI: The tile arch uses the generic ucontext.h file David Howells
2012-10-17 15:43   ` Chris Metcalf
2012-10-17 14:16 ` [PATCH 07/10] UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches David Howells
2012-10-17 14:16 ` [PATCH 08/10] UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty David Howells
2012-10-17 14:16 ` [PATCH 09/10] UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty David Howells
2012-10-17 14:16   ` David Howells
2012-10-17 14:16 ` [PATCH 10/10] UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty David Howells
2012-10-17 14:16   ` David Howells

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.