* [Linux-c6x-dev] [PATCH v2 7/7] uapi: export all headers under uapi directories
From: Mark Salter @ 2017-01-11 18:14 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1483695839-18660-8-git-send-email-nicolas.dichtel@6wind.com>
On Fri, 2017-01-06 at 10:43 +0100, Nicolas Dichtel wrote:
> Regularly, when a new header is created in include/uapi/, the developer
> forgets to add it in the corresponding Kbuild file. This error is usually
> detected after the release is out.
>
> In fact, all headers under uapi directories should be exported, thus it's
> useless to have an exhaustive list.
>
> After this patch, the following files, which were not exported, are now
> exported (with make headers_install_all):
> asm-unicore32/shmparam.h
> asm-unicore32/ucontext.h
> asm-hexagon/shmparam.h
> asm-mips/ucontext.h
> asm-mips/hwcap.h
> asm-mips/reg.h
> drm/vgem_drm.h
> drm/armada_drm.h
> drm/omap_drm.h
> drm/etnaviv_drm.h
> asm-tile/shmparam.h
> asm-blackfin/shmparam.h
> asm-blackfin/ucontext.h
> asm-powerpc/perf_regs.h
> rdma/qedr-abi.h
> asm-parisc/kvm_para.h
> asm-openrisc/shmparam.h
> asm-nios2/kvm_para.h
> asm-nios2/ucontext.h
> asm-sh/kvm_para.h
> asm-sh/ucontext.h
> asm-xtensa/kvm_para.h
> asm-avr32/kvm_para.h
> asm-m32r/kvm_para.h
> asm-h8300/shmparam.h
> asm-h8300/ucontext.h
> asm-metag/kvm_para.h
> asm-metag/shmparam.h
> asm-metag/ucontext.h
> asm-m68k/kvm_para.h
> asm-m68k/shmparam.h
> linux/bcache.h
> linux/kvm.h
> linux/kvm_para.h
> linux/kfd_ioctl.h
> linux/cryptouser.h
> linux/kcm.h
> linux/kcov.h
> linux/seg6_iptunnel.h
> linux/stm.h
> linux/genwqe
> linux/genwqe/.install
> linux/genwqe/genwqe_card.h
> linux/genwqe/..install.cmd
> linux/seg6.h
> linux/cifs
> linux/cifs/.install
> linux/cifs/cifs_mount.h
> linux/cifs/..install.cmd
> linux/auto_dev-ioctl.h
>
> Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all
> subdirs with a pure makefile command.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> ?Documentation/kbuild/makefiles.txt??????????|??41 ++-
> ?arch/alpha/include/uapi/asm/Kbuild??????????|??41 ---
> ?arch/arc/include/uapi/asm/Kbuild????????????|???3 -
> ?arch/arm/include/uapi/asm/Kbuild????????????|??17 -
> ?arch/arm64/include/uapi/asm/Kbuild??????????|??18 --
> ?arch/avr32/include/uapi/asm/Kbuild??????????|??20 --
> ?arch/blackfin/include/uapi/asm/Kbuild???????|??17 -
> ?arch/c6x/include/uapi/asm/Kbuild????????????|???8 -
> ?arch/cris/include/uapi/arch-v10/arch/Kbuild |???5 -
> ?arch/cris/include/uapi/arch-v32/arch/Kbuild |???3 -
> ?arch/cris/include/uapi/asm/Kbuild???????????|??43 +--
> ?arch/frv/include/uapi/asm/Kbuild????????????|??33 --
> ?arch/h8300/include/uapi/asm/Kbuild??????????|??28 --
> ?arch/hexagon/include/asm/Kbuild?????????????|???3 -
> ?arch/hexagon/include/uapi/asm/Kbuild????????|??13 -
> ?arch/ia64/include/uapi/asm/Kbuild???????????|??45 ---
> ?arch/m32r/include/uapi/asm/Kbuild???????????|??31 --
> ?arch/m68k/include/uapi/asm/Kbuild???????????|??24 --
> ?arch/metag/include/uapi/asm/Kbuild??????????|???8 -
> ?arch/microblaze/include/uapi/asm/Kbuild?????|??32 --
> ?arch/mips/include/uapi/asm/Kbuild???????????|??37 ---
> ?arch/mn10300/include/uapi/asm/Kbuild????????|??32 --
> ?arch/nios2/include/uapi/asm/Kbuild??????????|???4 +-
> ?arch/openrisc/include/asm/Kbuild????????????|???3 -
> ?arch/openrisc/include/uapi/asm/Kbuild???????|???8 -
> ?arch/parisc/include/uapi/asm/Kbuild?????????|??28 --
> ?arch/powerpc/include/uapi/asm/Kbuild????????|??45 ---
> ?arch/s390/include/uapi/asm/Kbuild???????????|??52 ---
> ?arch/score/include/asm/Kbuild???????????????|???4 -
> ?arch/score/include/uapi/asm/Kbuild??????????|??32 --
> ?arch/sh/include/uapi/asm/Kbuild?????????????|??23 --
> ?arch/sparc/include/uapi/asm/Kbuild??????????|??48 ---
> ?arch/tile/include/asm/Kbuild????????????????|???3 -
> ?arch/tile/include/uapi/arch/Kbuild??????????|??17 -
> ?arch/tile/include/uapi/asm/Kbuild???????????|??19 +-
> ?arch/unicore32/include/uapi/asm/Kbuild??????|???6 -
> ?arch/x86/include/uapi/asm/Kbuild????????????|??59 ----
> ?arch/xtensa/include/uapi/asm/Kbuild?????????|??23 --
> ?include/Kbuild??????????????????????????????|???2 -
> ?include/asm-generic/Kbuild.asm??????????????|???1 -
> ?include/scsi/fc/Kbuild??????????????????????|???0
> ?include/uapi/Kbuild?????????????????????????|??15 -
> ?include/uapi/asm-generic/Kbuild?????????????|??36 ---
> ?include/uapi/asm-generic/Kbuild.asm?????????|??62 ++--
> ?include/uapi/drm/Kbuild?????????????????????|??22 --
> ?include/uapi/linux/Kbuild???????????????????| 482 ----------------------------
> ?include/uapi/linux/android/Kbuild???????????|???2 -
> ?include/uapi/linux/byteorder/Kbuild?????????|???3 -
> ?include/uapi/linux/caif/Kbuild??????????????|???3 -
> ?include/uapi/linux/can/Kbuild???????????????|???6 -
> ?include/uapi/linux/dvb/Kbuild???????????????|???9 -
> ?include/uapi/linux/hdlc/Kbuild??????????????|???2 -
> ?include/uapi/linux/hsi/Kbuild???????????????|???2 -
> ?include/uapi/linux/iio/Kbuild???????????????|???3 -
> ?include/uapi/linux/isdn/Kbuild??????????????|???2 -
> ?include/uapi/linux/mmc/Kbuild???????????????|???2 -
> ?include/uapi/linux/netfilter/Kbuild?????????|??89 -----
> ?include/uapi/linux/netfilter/ipset/Kbuild???|???5 -
> ?include/uapi/linux/netfilter_arp/Kbuild?????|???3 -
> ?include/uapi/linux/netfilter_bridge/Kbuild??|??18 --
> ?include/uapi/linux/netfilter_ipv4/Kbuild????|??10 -
> ?include/uapi/linux/netfilter_ipv6/Kbuild????|??13 -
> ?include/uapi/linux/nfsd/Kbuild??????????????|???6 -
> ?include/uapi/linux/raid/Kbuild??????????????|???3 -
> ?include/uapi/linux/spi/Kbuild???????????????|???2 -
> ?include/uapi/linux/sunrpc/Kbuild????????????|???2 -
> ?include/uapi/linux/tc_act/Kbuild????????????|??15 -
> ?include/uapi/linux/tc_ematch/Kbuild?????????|???5 -
> ?include/uapi/linux/usb/Kbuild???????????????|??12 -
> ?include/uapi/linux/wimax/Kbuild?????????????|???2 -
> ?include/uapi/misc/Kbuild????????????????????|???2 -
> ?include/uapi/mtd/Kbuild?????????????????????|???6 -
> ?include/uapi/rdma/Kbuild????????????????????|??18 --
> ?include/uapi/rdma/hfi/Kbuild????????????????|???2 -
> ?include/uapi/scsi/Kbuild????????????????????|???6 -
> ?include/uapi/scsi/fc/Kbuild?????????????????|???5 -
> ?include/uapi/sound/Kbuild???????????????????|??16 -
> ?include/uapi/video/Kbuild???????????????????|???4 -
> ?include/uapi/xen/Kbuild?????????????????????|???5 -
> ?include/video/Kbuild????????????????????????|???0
> ?scripts/Makefile.headersinst????????????????|??39 +--
> ?81 files changed, 73 insertions(+), 1745 deletions(-)
> ?delete mode 100644 arch/cris/include/uapi/arch-v10/arch/Kbuild
> ?delete mode 100644 arch/cris/include/uapi/arch-v32/arch/Kbuild
> ?delete mode 100644 arch/tile/include/uapi/arch/Kbuild
> ?delete mode 100644 include/Kbuild
> ?delete mode 100644 include/asm-generic/Kbuild.asm
> ?delete mode 100644 include/scsi/fc/Kbuild
> ?delete mode 100644 include/uapi/Kbuild
> ?delete mode 100644 include/uapi/asm-generic/Kbuild
> ?delete mode 100644 include/uapi/drm/Kbuild
> ?delete mode 100644 include/uapi/linux/Kbuild
> ?delete mode 100644 include/uapi/linux/android/Kbuild
> ?delete mode 100644 include/uapi/linux/byteorder/Kbuild
> ?delete mode 100644 include/uapi/linux/caif/Kbuild
> ?delete mode 100644 include/uapi/linux/can/Kbuild
> ?delete mode 100644 include/uapi/linux/dvb/Kbuild
> ?delete mode 100644 include/uapi/linux/hdlc/Kbuild
> ?delete mode 100644 include/uapi/linux/hsi/Kbuild
> ?delete mode 100644 include/uapi/linux/iio/Kbuild
> ?delete mode 100644 include/uapi/linux/isdn/Kbuild
> ?delete mode 100644 include/uapi/linux/mmc/Kbuild
> ?delete mode 100644 include/uapi/linux/netfilter/Kbuild
> ?delete mode 100644 include/uapi/linux/netfilter/ipset/Kbuild
> ?delete mode 100644 include/uapi/linux/netfilter_arp/Kbuild
> ?delete mode 100644 include/uapi/linux/netfilter_bridge/Kbuild
> ?delete mode 100644 include/uapi/linux/netfilter_ipv4/Kbuild
> ?delete mode 100644 include/uapi/linux/netfilter_ipv6/Kbuild
> ?delete mode 100644 include/uapi/linux/nfsd/Kbuild
> ?delete mode 100644 include/uapi/linux/raid/Kbuild
> ?delete mode 100644 include/uapi/linux/spi/Kbuild
> ?delete mode 100644 include/uapi/linux/sunrpc/Kbuild
> ?delete mode 100644 include/uapi/linux/tc_act/Kbuild
> ?delete mode 100644 include/uapi/linux/tc_ematch/Kbuild
> ?delete mode 100644 include/uapi/linux/usb/Kbuild
> ?delete mode 100644 include/uapi/linux/wimax/Kbuild
> ?delete mode 100644 include/uapi/misc/Kbuild
> ?delete mode 100644 include/uapi/mtd/Kbuild
> ?delete mode 100644 include/uapi/rdma/Kbuild
> ?delete mode 100644 include/uapi/rdma/hfi/Kbuild
> ?delete mode 100644 include/uapi/scsi/Kbuild
> ?delete mode 100644 include/uapi/scsi/fc/Kbuild
> ?delete mode 100644 include/uapi/sound/Kbuild
> ?delete mode 100644 include/uapi/video/Kbuild
> ?delete mode 100644 include/uapi/xen/Kbuild
> ?delete mode 100644 include/video/Kbuild
>
> diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
> index 37b525d329ae..53e31061ff18 100644
> --- a/Documentation/kbuild/makefiles.txt
> +++ b/Documentation/kbuild/makefiles.txt
> @@ -44,7 +44,7 @@ This document describes the Linux kernel Makefiles.
> ? ???--- 6.11 Post-link pass
> ?
> ? === 7 Kbuild syntax for exported headers
> - --- 7.1 header-y
> + --- 7.1 subdir-y
> ? --- 7.2 genhdr-y
> ? --- 7.3 generic-y
> ? --- 7.4 generated-y
> @@ -1235,7 +1235,7 @@ When kbuild executes, the following steps are followed (roughly):
> ? that may be shared between individual architectures.
> ? The recommended approach how to use a generic header file is
> ? to list the file in the Kbuild file.
> - See "7.4 generic-y" for further info on syntax etc.
> + See "7.3 generic-y" for further info on syntax etc.
> ?
> ?--- 6.11 Post-link pass
> ?
> @@ -1262,37 +1262,36 @@ The pre-processing does:
> ?- drop include of compiler.h
> ?- drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
> ?
> -Each relevant directory contains a file name "Kbuild" which specifies the
> -headers to be exported.
> +All headers under include/uapi/, include/generated/uapi/,
> +arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
> +are exported.
> +
> +A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
> +arch/<arch>/include/asm/ to list asm files coming from asm-generic.
> ?See subsequent chapter for the syntax of the Kbuild file.
> ?
> - --- 7.1 header-y
> + --- 7.1 subdir-y
> ?
> - header-y specifies header files to be exported.
> + subdir-y may be used to specify a subdirectory to be exported.
> ?
> ? Example:
> - #include/linux/Kbuild
> - header-y += usb/
> - header-y += aio_abi.h
> + #arch/cris/include/uapi/asm/Kbuild
> + subdir-y += ../arch-v10/arch/
> + subdir-y += ../arch-v32/arch/
> ?
> - The convention is to list one file per line and
> + The convention is to list one subdir per line and
> ? preferably in alphabetic order.
> ?
> - header-y also specifies which subdirectories to visit.
> - A subdirectory is identified by a trailing '/' which
> - can be seen in the example above for the usb subdirectory.
> -
> - Subdirectories are visited before their parent directories.
> -
> ? --- 7.2 genhdr-y
> ?
> - genhdr-y specifies generated files to be exported.
> - Generated files are special as they need to be looked
> - up in another directory when doing 'make O=...' builds.
> + genhdr-y specifies asm files to be generated.
> ?
> ? Example:
> - #include/linux/Kbuild
> - genhdr-y += version.h
> + #arch/x86/include/uapi/asm/Kbuild
> + genhdr-y += unistd_32.h
> + genhdr-y += unistd_64.h
> + genhdr-y += unistd_x32.h
> +
> ?
> ? --- 7.3 generic-y
> ?
> diff --git a/arch/alpha/include/uapi/asm/Kbuild b/arch/alpha/include/uapi/asm/Kbuild
> index d96f2ef5b639..b15bf6bc0e94 100644
> --- a/arch/alpha/include/uapi/asm/Kbuild
> +++ b/arch/alpha/include/uapi/asm/Kbuild
> @@ -1,43 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += a.out.h
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += compiler.h
> -header-y += console.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += fpu.h
> -header-y += gentrap.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += pal.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += reg.h
> -header-y += regdef.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += sysinfo.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/arc/include/uapi/asm/Kbuild b/arch/arc/include/uapi/asm/Kbuild
> index f50d02df78d5..b15bf6bc0e94 100644
> --- a/arch/arc/include/uapi/asm/Kbuild
> +++ b/arch/arc/include/uapi/asm/Kbuild
> @@ -1,5 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -header-y += elf.h
> -header-y += page.h
> -header-y += cachectl.h
> diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
> index 46a76cd6acb6..607f702c2d62 100644
> --- a/arch/arm/include/uapi/asm/Kbuild
> +++ b/arch/arm/include/uapi/asm/Kbuild
> @@ -1,23 +1,6 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> -header-y += auxvec.h
> -header-y += byteorder.h
> -header-y += fcntl.h
> -header-y += hwcap.h
> -header-y += ioctls.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += perf_regs.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += setup.h
> -header-y += sigcontext.h
> -header-y += signal.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += unistd.h
> ?genhdr-y += unistd-common.h
> ?genhdr-y += unistd-oabi.h
> ?genhdr-y += unistd-eabi.h
> diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild
> index 825b0fe51c2b..13a97aa2285f 100644
> --- a/arch/arm64/include/uapi/asm/Kbuild
> +++ b/arch/arm64/include/uapi/asm/Kbuild
> @@ -2,21 +2,3 @@
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> ?generic-y += kvm_para.h
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += fcntl.h
> -header-y += hwcap.h
> -header-y += kvm_para.h
> -header-y += perf_regs.h
> -header-y += param.h
> -header-y += ptrace.h
> -header-y += setup.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += ucontext.h
> -header-y += unistd.h
> diff --git a/arch/avr32/include/uapi/asm/Kbuild b/arch/avr32/include/uapi/asm/Kbuild
> index 08d8a3d76ea8..610395083364 100644
> --- a/arch/avr32/include/uapi/asm/Kbuild
> +++ b/arch/avr32/include/uapi/asm/Kbuild
> @@ -1,26 +1,6 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> -header-y += auxvec.h
> -header-y += byteorder.h
> -header-y += cachectl.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> ?generic-y += bitsperlong.h
> ?generic-y += errno.h
> ?generic-y += fcntl.h
> diff --git a/arch/blackfin/include/uapi/asm/Kbuild b/arch/blackfin/include/uapi/asm/Kbuild
> index 0bd28f77abc3..b15bf6bc0e94 100644
> --- a/arch/blackfin/include/uapi/asm/Kbuild
> +++ b/arch/blackfin/include/uapi/asm/Kbuild
> @@ -1,19 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += bfin_sport.h
> -header-y += byteorder.h
> -header-y += cachectl.h
> -header-y += fcntl.h
> -header-y += fixed_code.h
> -header-y += ioctls.h
> -header-y += kvm_para.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += stat.h
> -header-y += swab.h
> -header-y += unistd.h
> diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild
> index e9bc2b2b8147..13a97aa2285f 100644
> --- a/arch/c6x/include/uapi/asm/Kbuild
> +++ b/arch/c6x/include/uapi/asm/Kbuild
> @@ -2,11 +2,3 @@
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> ?generic-y += kvm_para.h
> -
> -header-y += byteorder.h
> -header-y += kvm_para.h
> -header-y += ptrace.h
> -header-y += setup.h
> -header-y += sigcontext.h
> -header-y += swab.h
> -header-y += unistd.h
Acked-by: Mark Salter <msalter@redhat.com>
> diff --git a/arch/cris/include/uapi/arch-v10/arch/Kbuild b/arch/cris/include/uapi/arch-v10/arch/Kbuild
> deleted file mode 100644
> index 9048c87a782b..000000000000
> --- a/arch/cris/include/uapi/arch-v10/arch/Kbuild
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -# UAPI Header export list
> -header-y += sv_addr.agh
> -header-y += sv_addr_ag.h
> -header-y += svinto.h
> -header-y += user.h
> diff --git a/arch/cris/include/uapi/arch-v32/arch/Kbuild b/arch/cris/include/uapi/arch-v32/arch/Kbuild
> deleted file mode 100644
> index 59efffd16b61..000000000000
> --- a/arch/cris/include/uapi/arch-v32/arch/Kbuild
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# UAPI Header export list
> -header-y += cryptocop.h
> -header-y += user.h
> diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild
> index d5564a0ae66a..d0c5471856e0 100644
> --- a/arch/cris/include/uapi/asm/Kbuild
> +++ b/arch/cris/include/uapi/asm/Kbuild
> @@ -1,44 +1,5 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> -header-y += ../arch-v10/arch/
> -header-y += ../arch-v32/arch/
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += elf.h
> -header-y += elf_v10.h
> -header-y += elf_v32.h
> -header-y += errno.h
> -header-y += ethernet.h
> -header-y += etraxgpio.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += ptrace_v10.h
> -header-y += ptrace_v32.h
> -header-y += resource.h
> -header-y += rs485.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += sync_serial.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> +subdir-y += ../arch-v10/arch/
> +subdir-y += ../arch-v32/arch/
> diff --git a/arch/frv/include/uapi/asm/Kbuild b/arch/frv/include/uapi/asm/Kbuild
> index 42a2b33461c0..b15bf6bc0e94 100644
> --- a/arch/frv/include/uapi/asm/Kbuild
> +++ b/arch/frv/include/uapi/asm/Kbuild
> @@ -1,35 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += registers.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/h8300/include/uapi/asm/Kbuild b/arch/h8300/include/uapi/asm/Kbuild
> index fb6101a5d4f1..b15bf6bc0e94 100644
> --- a/arch/h8300/include/uapi/asm/Kbuild
> +++ b/arch/h8300/include/uapi/asm/Kbuild
> @@ -1,30 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += siginfo.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild
> index db8ddabc6bd2..f3b1ceb5c1e4 100644
> --- a/arch/hexagon/include/asm/Kbuild
> +++ b/arch/hexagon/include/asm/Kbuild
> @@ -1,6 +1,3 @@
> -
> -header-y += ucontext.h
> -
> ?generic-y += auxvec.h
> ?generic-y += barrier.h
> ?generic-y += bug.h
> diff --git a/arch/hexagon/include/uapi/asm/Kbuild b/arch/hexagon/include/uapi/asm/Kbuild
> index c31706c38631..b15bf6bc0e94 100644
> --- a/arch/hexagon/include/uapi/asm/Kbuild
> +++ b/arch/hexagon/include/uapi/asm/Kbuild
> @@ -1,15 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += kvm_para.h
> -header-y += param.h
> -header-y += ptrace.h
> -header-y += registers.h
> -header-y += setup.h
> -header-y += sigcontext.h
> -header-y += signal.h
> -header-y += swab.h
> -header-y += unistd.h
> -header-y += user.h
> diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild
> index 891002bbb995..13a97aa2285f 100644
> --- a/arch/ia64/include/uapi/asm/Kbuild
> +++ b/arch/ia64/include/uapi/asm/Kbuild
> @@ -2,48 +2,3 @@
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> ?generic-y += kvm_para.h
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += break.h
> -header-y += byteorder.h
> -header-y += cmpxchg.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += fpu.h
> -header-y += gcc_intrin.h
> -header-y += ia64regs.h
> -header-y += intel_intrin.h
> -header-y += intrinsics.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += perfmon.h
> -header-y += perfmon_default_smpl.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += ptrace_offsets.h
> -header-y += resource.h
> -header-y += rse.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += ucontext.h
> -header-y += unistd.h
> -header-y += ustack.h
> diff --git a/arch/m32r/include/uapi/asm/Kbuild b/arch/m32r/include/uapi/asm/Kbuild
> index 43937a61d6cf..b15bf6bc0e94 100644
> --- a/arch/m32r/include/uapi/asm/Kbuild
> +++ b/arch/m32r/include/uapi/asm/Kbuild
> @@ -1,33 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild
> index 6a2d257bdfb2..64368077235a 100644
> --- a/arch/m68k/include/uapi/asm/Kbuild
> +++ b/arch/m68k/include/uapi/asm/Kbuild
> @@ -9,27 +9,3 @@ generic-y += socket.h
> ?generic-y += sockios.h
> ?generic-y += termbits.h
> ?generic-y += termios.h
> -
> -header-y += a.out.h
> -header-y += bootinfo.h
> -header-y += bootinfo-amiga.h
> -header-y += bootinfo-apollo.h
> -header-y += bootinfo-atari.h
> -header-y += bootinfo-hp300.h
> -header-y += bootinfo-mac.h
> -header-y += bootinfo-q40.h
> -header-y += bootinfo-vme.h
> -header-y += byteorder.h
> -header-y += cachectl.h
> -header-y += fcntl.h
> -header-y += ioctls.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += setup.h
> -header-y += sigcontext.h
> -header-y += signal.h
> -header-y += stat.h
> -header-y += swab.h
> -header-y += unistd.h
> diff --git a/arch/metag/include/uapi/asm/Kbuild b/arch/metag/include/uapi/asm/Kbuild
> index ab78be2b6eb0..b29731ebd7a9 100644
> --- a/arch/metag/include/uapi/asm/Kbuild
> +++ b/arch/metag/include/uapi/asm/Kbuild
> @@ -1,14 +1,6 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> -header-y += byteorder.h
> -header-y += ech.h
> -header-y += ptrace.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += swab.h
> -header-y += unistd.h
> -
> ?generic-y += mman.h
> ?generic-y += resource.h
> ?generic-y += setup.h
> diff --git a/arch/microblaze/include/uapi/asm/Kbuild b/arch/microblaze/include/uapi/asm/Kbuild
> index 1aac99f87df1..2178c78c7c1a 100644
> --- a/arch/microblaze/include/uapi/asm/Kbuild
> +++ b/arch/microblaze/include/uapi/asm/Kbuild
> @@ -2,35 +2,3 @@
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> ?generic-y += types.h
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += elf.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += unistd.h
> diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild
> index f2cf41461146..a0266feba9e6 100644
> --- a/arch/mips/include/uapi/asm/Kbuild
> +++ b/arch/mips/include/uapi/asm/Kbuild
> @@ -2,40 +2,3 @@
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> ?generic-y += ipcbuf.h
> -
> -header-y += auxvec.h
> -header-y += bitfield.h
> -header-y += bitsperlong.h
> -header-y += break.h
> -header-y += byteorder.h
> -header-y += cachectl.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += inst.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += sgidefs.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += sysmips.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/mn10300/include/uapi/asm/Kbuild b/arch/mn10300/include/uapi/asm/Kbuild
> index 040178cdb3eb..b15bf6bc0e94 100644
> --- a/arch/mn10300/include/uapi/asm/Kbuild
> +++ b/arch/mn10300/include/uapi/asm/Kbuild
> @@ -1,34 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
> index e0bb972a50d7..766455d0d291 100644
> --- a/arch/nios2/include/uapi/asm/Kbuild
> +++ b/arch/nios2/include/uapi/asm/Kbuild
> @@ -1,5 +1,3 @@
> +# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += elf.h
> -
> ?generic-y += ucontext.h
> diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
> index 2832f031fb11..561915716fd9 100644
> --- a/arch/openrisc/include/asm/Kbuild
> +++ b/arch/openrisc/include/asm/Kbuild
> @@ -1,6 +1,3 @@
> -
> -header-y += ucontext.h
> -
> ?generic-y += atomic.h
> ?generic-y += auxvec.h
> ?generic-y += barrier.h
> diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild
> index 80761eb82b5f..b15bf6bc0e94 100644
> --- a/arch/openrisc/include/uapi/asm/Kbuild
> +++ b/arch/openrisc/include/uapi/asm/Kbuild
> @@ -1,10 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += byteorder.h
> -header-y += elf.h
> -header-y += kvm_para.h
> -header-y += param.h
> -header-y += ptrace.h
> -header-y += sigcontext.h
> -header-y += unistd.h
> diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
> index 348356c99514..3971c60a7e7f 100644
> --- a/arch/parisc/include/uapi/asm/Kbuild
> +++ b/arch/parisc/include/uapi/asm/Kbuild
> @@ -2,31 +2,3 @@
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> ?generic-y += resource.h
> -
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += pdc.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild
> index dab3717e3ea0..b15bf6bc0e94 100644
> --- a/arch/powerpc/include/uapi/asm/Kbuild
> +++ b/arch/powerpc/include/uapi/asm/Kbuild
> @@ -1,47 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += bootx.h
> -header-y += byteorder.h
> -header-y += cputable.h
> -header-y += eeh.h
> -header-y += elf.h
> -header-y += epapr_hcalls.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += nvram.h
> -header-y += opal-prd.h
> -header-y += param.h
> -header-y += perf_event.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ps3fb.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += spu_info.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += tm.h
> -header-y += types.h
> -header-y += ucontext.h
> -header-y += unistd.h
> diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild
> index bf736e764cb4..b15bf6bc0e94 100644
> --- a/arch/s390/include/uapi/asm/Kbuild
> +++ b/arch/s390/include/uapi/asm/Kbuild
> @@ -1,54 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += chpid.h
> -header-y += chsc.h
> -header-y += clp.h
> -header-y += cmb.h
> -header-y += dasd.h
> -header-y += debug.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += hypfs.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm.h
> -header-y += kvm_para.h
> -header-y += kvm_perf.h
> -header-y += kvm_virtio.h
> -header-y += mman.h
> -header-y += monwriter.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += qeth.h
> -header-y += resource.h
> -header-y += schid.h
> -header-y += sclp_ctl.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sie.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += tape390.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += ucontext.h
> -header-y += unistd.h
> -header-y += virtio-ccw.h
> -header-y += vtoc.h
> -header-y += zcrypt.h
> diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild
> index a05218ff3fe4..128ca7ec0220 100644
> --- a/arch/score/include/asm/Kbuild
> +++ b/arch/score/include/asm/Kbuild
> @@ -1,7 +1,3 @@
> -
> -header-y +=
> -
> -
> ?generic-y += barrier.h
> ?generic-y += clkdev.h
> ?generic-y += cputime.h
> diff --git a/arch/score/include/uapi/asm/Kbuild b/arch/score/include/uapi/asm/Kbuild
> index 040178cdb3eb..b15bf6bc0e94 100644
> --- a/arch/score/include/uapi/asm/Kbuild
> +++ b/arch/score/include/uapi/asm/Kbuild
> @@ -1,34 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild
> index 60613ae78513..b15bf6bc0e94 100644
> --- a/arch/sh/include/uapi/asm/Kbuild
> +++ b/arch/sh/include/uapi/asm/Kbuild
> @@ -1,25 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += byteorder.h
> -header-y += cachectl.h
> -header-y += cpu-features.h
> -header-y += hw_breakpoint.h
> -header-y += ioctls.h
> -header-y += posix_types.h
> -header-y += posix_types_32.h
> -header-y += posix_types_64.h
> -header-y += ptrace.h
> -header-y += ptrace_32.h
> -header-y += ptrace_64.h
> -header-y += setup.h
> -header-y += sigcontext.h
> -header-y += signal.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += swab.h
> -header-y += types.h
> -header-y += unistd.h
> -header-y += unistd_32.h
> -header-y += unistd_64.h
> diff --git a/arch/sparc/include/uapi/asm/Kbuild b/arch/sparc/include/uapi/asm/Kbuild
> index b5843ee09fb5..b15bf6bc0e94 100644
> --- a/arch/sparc/include/uapi/asm/Kbuild
> +++ b/arch/sparc/include/uapi/asm/Kbuild
> @@ -1,50 +1,2 @@
> ?# UAPI Header export list
> -# User exported sparc header files
> -
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += apc.h
> -header-y += asi.h
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += display7seg.h
> -header-y += envctrl.h
> -header-y += errno.h
> -header-y += fbio.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += jsflash.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += openpromio.h
> -header-y += param.h
> -header-y += perfctr.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += psr.h
> -header-y += psrcompat.h
> -header-y += pstate.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += traps.h
> -header-y += uctx.h
> -header-y += unistd.h
> -header-y += utrap.h
> -header-y += watchdog.h
> diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild
> index 2d1f5638974c..057eaa533877 100644
> --- a/arch/tile/include/asm/Kbuild
> +++ b/arch/tile/include/asm/Kbuild
> @@ -1,6 +1,3 @@
> -
> -header-y += ../arch/
> -
> ?generic-y += bug.h
> ?generic-y += bugs.h
> ?generic-y += clkdev.h
> diff --git a/arch/tile/include/uapi/arch/Kbuild b/arch/tile/include/uapi/arch/Kbuild
> deleted file mode 100644
> index 97dfbecec6b6..000000000000
> --- a/arch/tile/include/uapi/arch/Kbuild
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -# UAPI Header export list
> -header-y += abi.h
> -header-y += chip.h
> -header-y += chip_tilegx.h
> -header-y += chip_tilepro.h
> -header-y += icache.h
> -header-y += interrupts.h
> -header-y += interrupts_32.h
> -header-y += interrupts_64.h
> -header-y += opcode.h
> -header-y += opcode_tilegx.h
> -header-y += opcode_tilepro.h
> -header-y += sim.h
> -header-y += sim_def.h
> -header-y += spr_def.h
> -header-y += spr_def_32.h
> -header-y += spr_def_64.h
> diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild
> index c20db8e428bf..e0a50111e07f 100644
> --- a/arch/tile/include/uapi/asm/Kbuild
> +++ b/arch/tile/include/uapi/asm/Kbuild
> @@ -1,21 +1,6 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += cachectl.h
> -header-y += hardwall.h
> -header-y += kvm_para.h
> -header-y += mman.h
> -header-y += ptrace.h
> -header-y += setup.h
> -header-y += sigcontext.h
> -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
> +
> +subdir-y += ../arch
> diff --git a/arch/unicore32/include/uapi/asm/Kbuild b/arch/unicore32/include/uapi/asm/Kbuild
> index 0514d7ad6855..13a97aa2285f 100644
> --- a/arch/unicore32/include/uapi/asm/Kbuild
> +++ b/arch/unicore32/include/uapi/asm/Kbuild
> @@ -1,10 +1,4 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> ?
> -header-y += byteorder.h
> -header-y += kvm_para.h
> -header-y += ptrace.h
> -header-y += sigcontext.h
> -header-y += unistd.h
> -
> ?generic-y += kvm_para.h
> diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild
> index 3dec769cadf7..83b6e9a0dce4 100644
> --- a/arch/x86/include/uapi/asm/Kbuild
> +++ b/arch/x86/include/uapi/asm/Kbuild
> @@ -4,62 +4,3 @@ include include/uapi/asm-generic/Kbuild.asm
> ?genhdr-y += unistd_32.h
> ?genhdr-y += unistd_64.h
> ?genhdr-y += unistd_x32.h
> -header-y += a.out.h
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += boot.h
> -header-y += bootparam.h
> -header-y += byteorder.h
> -header-y += debugreg.h
> -header-y += e820.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += hw_breakpoint.h
> -header-y += hyperv.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += ist.h
> -header-y += kvm.h
> -header-y += kvm_para.h
> -header-y += kvm_perf.h
> -header-y += ldt.h
> -header-y += mce.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += msr-index.h
> -header-y += msr.h
> -header-y += mtrr.h
> -header-y += param.h
> -header-y += perf_regs.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += posix_types_32.h
> -header-y += posix_types_64.h
> -header-y += posix_types_x32.h
> -header-y += prctl.h
> -header-y += processor-flags.h
> -header-y += ptrace-abi.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += sigcontext32.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += svm.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += ucontext.h
> -header-y += unistd.h
> -header-y += vm86.h
> -header-y += vmx.h
> -header-y += vsyscall.h
> diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild
> index 56aad54e7fb7..b15bf6bc0e94 100644
> --- a/arch/xtensa/include/uapi/asm/Kbuild
> +++ b/arch/xtensa/include/uapi/asm/Kbuild
> @@ -1,25 +1,2 @@
> ?# UAPI Header export list
> ?include include/uapi/asm-generic/Kbuild.asm
> -
> -header-y += auxvec.h
> -header-y += byteorder.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += types.h
> -header-y += unistd.h
> diff --git a/include/Kbuild b/include/Kbuild
> deleted file mode 100644
> index bab1145bc7a7..000000000000
> --- a/include/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# Top-level Makefile calls into asm-$(ARCH)
> -# List only non-arch directories below
> diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
> deleted file mode 100644
> index d2ee86b4c091..000000000000
> --- a/include/asm-generic/Kbuild.asm
> +++ /dev/null
> @@ -1 +0,0 @@
> -include include/uapi/asm-generic/Kbuild.asm
> diff --git a/include/scsi/fc/Kbuild b/include/scsi/fc/Kbuild
> deleted file mode 100644
> index e69de29bb2d1..000000000000
> diff --git a/include/uapi/Kbuild b/include/uapi/Kbuild
> deleted file mode 100644
> index 245aa6e05e6a..000000000000
> --- a/include/uapi/Kbuild
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -# UAPI Header export list
> -# 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/
> -header-y += misc/
> diff --git a/include/uapi/asm-generic/Kbuild b/include/uapi/asm-generic/Kbuild
> deleted file mode 100644
> index b73de7bb7a62..000000000000
> --- a/include/uapi/asm-generic/Kbuild
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -# UAPI Header export list
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += errno-base.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += int-l64.h
> -header-y += int-ll64.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += kvm_para.h
> -header-y += mman-common.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += shmparam.h
> -header-y += siginfo.h
> -header-y += signal-defs.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += ucontext.h
> -header-y += unistd.h
> diff --git a/include/uapi/asm-generic/Kbuild.asm b/include/uapi/asm-generic/Kbuild.asm
> index fcd50b759217..c13805d5a2a0 100644
> --- a/include/uapi/asm-generic/Kbuild.asm
> +++ b/include/uapi/asm-generic/Kbuild.asm
> @@ -8,38 +8,38 @@ opt-header += a.out.h
> ?#
> ?# Headers that are mandatory in usr/include/asm/
> ?#
> -header-y += auxvec.h
> -header-y += bitsperlong.h
> -header-y += byteorder.h
> -header-y += errno.h
> -header-y += fcntl.h
> -header-y += ioctl.h
> -header-y += ioctls.h
> -header-y += ipcbuf.h
> -header-y += mman.h
> -header-y += msgbuf.h
> -header-y += param.h
> -header-y += poll.h
> -header-y += posix_types.h
> -header-y += ptrace.h
> -header-y += resource.h
> -header-y += sembuf.h
> -header-y += setup.h
> -header-y += shmbuf.h
> -header-y += sigcontext.h
> -header-y += siginfo.h
> -header-y += signal.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += stat.h
> -header-y += statfs.h
> -header-y += swab.h
> -header-y += termbits.h
> -header-y += termios.h
> -header-y += types.h
> -header-y += unistd.h
> +generic-y += auxvec.h
> +generic-y += bitsperlong.h
> +generic-y += byteorder.h
> +generic-y += errno.h
> +generic-y += fcntl.h
> +generic-y += ioctl.h
> +generic-y += ioctls.h
> +generic-y += ipcbuf.h
> +generic-y += mman.h
> +generic-y += msgbuf.h
> +generic-y += param.h
> +generic-y += poll.h
> +generic-y += posix_types.h
> +generic-y += ptrace.h
> +generic-y += resource.h
> +generic-y += sembuf.h
> +generic-y += setup.h
> +generic-y += shmbuf.h
> +generic-y += sigcontext.h
> +generic-y += siginfo.h
> +generic-y += signal.h
> +generic-y += socket.h
> +generic-y += sockios.h
> +generic-y += stat.h
> +generic-y += statfs.h
> +generic-y += swab.h
> +generic-y += termbits.h
> +generic-y += termios.h
> +generic-y += types.h
> +generic-y += unistd.h
> ?
> -header-y += $(foreach hdr,$(opt-header), \
> +generic-y += $(foreach hdr,$(opt-header), \
> ? ??????$(if \
> ? $(wildcard \
> ? $(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) \
> diff --git a/include/uapi/drm/Kbuild b/include/uapi/drm/Kbuild
> deleted file mode 100644
> index 9355dd8eff3b..000000000000
> --- a/include/uapi/drm/Kbuild
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -# UAPI Header export list
> -header-y += drm.h
> -header-y += drm_fourcc.h
> -header-y += drm_mode.h
> -header-y += drm_sarea.h
> -header-y += amdgpu_drm.h
> -header-y += exynos_drm.h
> -header-y += i810_drm.h
> -header-y += i915_drm.h
> -header-y += mga_drm.h
> -header-y += nouveau_drm.h
> -header-y += qxl_drm.h
> -header-y += r128_drm.h
> -header-y += radeon_drm.h
> -header-y += savage_drm.h
> -header-y += sis_drm.h
> -header-y += tegra_drm.h
> -header-y += via_drm.h
> -header-y += vmwgfx_drm.h
> -header-y += msm_drm.h
> -header-y += vc4_drm.h
> -header-y += virtgpu_drm.h
> diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
> deleted file mode 100644
> index a8b93e685239..000000000000
> --- a/include/uapi/linux/Kbuild
> +++ /dev/null
> @@ -1,482 +0,0 @@
> -# UAPI Header export list
> -header-y += android/
> -header-y += byteorder/
> -header-y += can/
> -header-y += caif/
> -header-y += dvb/
> -header-y += hdlc/
> -header-y += hsi/
> -header-y += iio/
> -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/
> -
> -genhdr-y += version.h
> -
> -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \
> - ??$(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),)
> -header-y += a.out.h
> -endif
> -
> -header-y += acct.h
> -header-y += adb.h
> -header-y += adfs_fs.h
> -header-y += affs_hardblocks.h
> -header-y += agpgart.h
> -header-y += aio_abi.h
> -header-y += am437x-vpfe.h
> -header-y += apm_bios.h
> -header-y += arcfb.h
> -header-y += atalk.h
> -header-y += atmapi.h
> -header-y += atmarp.h
> -header-y += atmbr2684.h
> -header-y += atmclip.h
> -header-y += atmdev.h
> -header-y += atm_eni.h
> -header-y += atm.h
> -header-y += atm_he.h
> -header-y += atm_idt77105.h
> -header-y += atmioc.h
> -header-y += atmlec.h
> -header-y += atmmpc.h
> -header-y += atm_nicstar.h
> -header-y += atmppp.h
> -header-y += atmsap.h
> -header-y += atmsvc.h
> -header-y += atm_tcp.h
> -header-y += atm_zatm.h
> -header-y += audit.h
> -header-y += auto_fs4.h
> -header-y += auto_fs.h
> -header-y += auxvec.h
> -header-y += ax25.h
> -header-y += b1lli.h
> -header-y += baycom.h
> -header-y += bcm933xx_hcs.h
> -header-y += bfs_fs.h
> -header-y += binfmts.h
> -header-y += blkpg.h
> -header-y += blktrace_api.h
> -header-y += blkzoned.h
> -header-y += bpf_common.h
> -header-y += bpf_perf_event.h
> -header-y += bpf.h
> -header-y += bpqether.h
> -header-y += bsg.h
> -header-y += bt-bmc.h
> -header-y += btrfs.h
> -header-y += can.h
> -header-y += capability.h
> -header-y += capi.h
> -header-y += cciss_defs.h
> -header-y += cciss_ioctl.h
> -header-y += cdrom.h
> -header-y += cec.h
> -header-y += cec-funcs.h
> -header-y += cgroupstats.h
> -header-y += chio.h
> -header-y += cm4000_cs.h
> -header-y += cn_proc.h
> -header-y += coda.h
> -header-y += coda_psdev.h
> -header-y += coff.h
> -header-y += connector.h
> -header-y += const.h
> -header-y += cramfs_fs.h
> -header-y += cuda.h
> -header-y += cyclades.h
> -header-y += cycx_cfm.h
> -header-y += dcbnl.h
> -header-y += dccp.h
> -header-y += devlink.h
> -header-y += dlmconstants.h
> -header-y += dlm_device.h
> -header-y += dlm.h
> -header-y += dlm_netlink.h
> -header-y += dlm_plock.h
> -header-y += dm-ioctl.h
> -header-y += dm-log-userspace.h
> -header-y += dn.h
> -header-y += dqblk_xfs.h
> -header-y += edd.h
> -header-y += efs_fs_sb.h
> -header-y += elfcore.h
> -header-y += elf-em.h
> -header-y += elf-fdpic.h
> -header-y += elf.h
> -header-y += errno.h
> -header-y += errqueue.h
> -header-y += ethtool.h
> -header-y += eventpoll.h
> -header-y += fadvise.h
> -header-y += falloc.h
> -header-y += fanotify.h
> -header-y += fb.h
> -header-y += fcntl.h
> -header-y += fd.h
> -header-y += fdreg.h
> -header-y += fib_rules.h
> -header-y += fiemap.h
> -header-y += filter.h
> -header-y += firewire-cdev.h
> -header-y += firewire-constants.h
> -header-y += flat.h
> -header-y += fou.h
> -header-y += fs.h
> -header-y += fsl_hypervisor.h
> -header-y += fuse.h
> -header-y += futex.h
> -header-y += gameport.h
> -header-y += genetlink.h
> -header-y += gen_stats.h
> -header-y += gfs2_ondisk.h
> -header-y += gigaset_dev.h
> -header-y += gpio.h
> -header-y += gsmmux.h
> -header-y += gtp.h
> -header-y += hdlcdrv.h
> -header-y += hdlc.h
> -header-y += hdreg.h
> -header-y += hiddev.h
> -header-y += hid.h
> -header-y += hidraw.h
> -header-y += hpet.h
> -header-y += hsr_netlink.h
> -header-y += hyperv.h
> -header-y += hysdn_if.h
> -header-y += i2c-dev.h
> -header-y += i2c.h
> -header-y += i2o-dev.h
> -header-y += i8k.h
> -header-y += icmp.h
> -header-y += icmpv6.h
> -header-y += if_addr.h
> -header-y += if_addrlabel.h
> -header-y += if_alg.h
> -header-y += if_arcnet.h
> -header-y += if_arp.h
> -header-y += if_bonding.h
> -header-y += if_bridge.h
> -header-y += if_cablemodem.h
> -header-y += if_eql.h
> -header-y += if_ether.h
> -header-y += if_fc.h
> -header-y += if_fddi.h
> -header-y += if_frad.h
> -header-y += if.h
> -header-y += if_hippi.h
> -header-y += if_infiniband.h
> -header-y += if_link.h
> -header-y += if_ltalk.h
> -header-y += if_macsec.h
> -header-y += if_packet.h
> -header-y += if_phonet.h
> -header-y += if_plip.h
> -header-y += if_ppp.h
> -header-y += if_pppol2tp.h
> -header-y += if_pppox.h
> -header-y += if_slip.h
> -header-y += if_team.h
> -header-y += if_tun.h
> -header-y += if_tunnel.h
> -header-y += if_vlan.h
> -header-y += if_x25.h
> -header-y += igmp.h
> -header-y += ila.h
> -header-y += in6.h
> -header-y += inet_diag.h
> -header-y += in.h
> -header-y += inotify.h
> -header-y += input.h
> -header-y += input-event-codes.h
> -header-y += in_route.h
> -header-y += ioctl.h
> -header-y += ip6_tunnel.h
> -header-y += ipc.h
> -header-y += ip.h
> -header-y += ipmi.h
> -header-y += ipmi_msgdefs.h
> -header-y += ipsec.h
> -header-y += ipv6.h
> -header-y += ipv6_route.h
> -header-y += ip_vs.h
> -header-y += ipx.h
> -header-y += irda.h
> -header-y += irqnr.h
> -header-y += isdn_divertif.h
> -header-y += isdn.h
> -header-y += isdnif.h
> -header-y += isdn_ppp.h
> -header-y += iso_fs.h
> -header-y += ivtvfb.h
> -header-y += ivtv.h
> -header-y += ixjuser.h
> -header-y += jffs2.h
> -header-y += joystick.h
> -header-y += kcmp.h
> -header-y += kdev_t.h
> -header-y += kd.h
> -header-y += kernelcapi.h
> -header-y += kernel.h
> -header-y += kernel-page-flags.h
> -header-y += kexec.h
> -header-y += keyboard.h
> -header-y += keyctl.h
> -
> -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h \
> - ??$(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),)
> -header-y += kvm.h
> -endif
> -
> -
> -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h \
> - ??$(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h),)
> -header-y += kvm_para.h
> -endif
> -
> -header-y += hw_breakpoint.h
> -header-y += l2tp.h
> -header-y += libc-compat.h
> -header-y += lirc.h
> -header-y += limits.h
> -header-y += llc.h
> -header-y += loop.h
> -header-y += lp.h
> -header-y += lwtunnel.h
> -header-y += magic.h
> -header-y += major.h
> -header-y += map_to_7segment.h
> -header-y += matroxfb.h
> -header-y += mdio.h
> -header-y += media.h
> -header-y += media-bus-format.h
> -header-y += mei.h
> -header-y += membarrier.h
> -header-y += memfd.h
> -header-y += mempolicy.h
> -header-y += meye.h
> -header-y += mic_common.h
> -header-y += mic_ioctl.h
> -header-y += mii.h
> -header-y += minix_fs.h
> -header-y += mman.h
> -header-y += mmtimer.h
> -header-y += mpls.h
> -header-y += mpls_iptunnel.h
> -header-y += mqueue.h
> -header-y += mroute6.h
> -header-y += mroute.h
> -header-y += msdos_fs.h
> -header-y += msg.h
> -header-y += mtio.h
> -header-y += nbd.h
> -header-y += ncp_fs.h
> -header-y += ncp.h
> -header-y += ncp_mount.h
> -header-y += ncp_no.h
> -header-y += ndctl.h
> -header-y += neighbour.h
> -header-y += netconf.h
> -header-y += netdevice.h
> -header-y += net_dropmon.h
> -header-y += netfilter_arp.h
> -header-y += netfilter_bridge.h
> -header-y += netfilter_decnet.h
> -header-y += netfilter.h
> -header-y += netfilter_ipv4.h
> -header-y += netfilter_ipv6.h
> -header-y += net.h
> -header-y += netlink_diag.h
> -header-y += netlink.h
> -header-y += netrom.h
> -header-y += net_namespace.h
> -header-y += net_tstamp.h
> -header-y += nfc.h
> -header-y += nfs2.h
> -header-y += nfs3.h
> -header-y += nfs4.h
> -header-y += nfs4_mount.h
> -header-y += nfsacl.h
> -header-y += nfs_fs.h
> -header-y += nfs.h
> -header-y += nfs_idmap.h
> -header-y += nfs_mount.h
> -header-y += nl80211.h
> -header-y += n_r3964.h
> -header-y += nubus.h
> -header-y += nvme_ioctl.h
> -header-y += nvram.h
> -header-y += omap3isp.h
> -header-y += omapfb.h
> -header-y += oom.h
> -header-y += openvswitch.h
> -header-y += packet_diag.h
> -header-y += param.h
> -header-y += parport.h
> -header-y += patchkey.h
> -header-y += pci.h
> -header-y += pci_regs.h
> -header-y += perf_event.h
> -header-y += personality.h
> -header-y += pfkeyv2.h
> -header-y += pg.h
> -header-y += phantom.h
> -header-y += phonet.h
> -header-y += pktcdvd.h
> -header-y += pkt_cls.h
> -header-y += pkt_sched.h
> -header-y += pmu.h
> -header-y += poll.h
> -header-y += posix_acl.h
> -header-y += posix_acl_xattr.h
> -header-y += posix_types.h
> -header-y += ppdev.h
> -header-y += ppp-comp.h
> -header-y += ppp_defs.h
> -header-y += ppp-ioctl.h
> -header-y += pps.h
> -header-y += prctl.h
> -header-y += psci.h
> -header-y += ptp_clock.h
> -header-y += ptrace.h
> -header-y += qnx4_fs.h
> -header-y += qnxtypes.h
> -header-y += quota.h
> -header-y += radeonfb.h
> -header-y += random.h
> -header-y += raw.h
> -header-y += rds.h
> -header-y += reboot.h
> -header-y += reiserfs_fs.h
> -header-y += reiserfs_xattr.h
> -header-y += resource.h
> -header-y += rfkill.h
> -header-y += rio_cm_cdev.h
> -header-y += rio_mport_cdev.h
> -header-y += romfs_fs.h
> -header-y += rose.h
> -header-y += route.h
> -header-y += rtc.h
> -header-y += rtnetlink.h
> -header-y += scc.h
> -header-y += sched.h
> -header-y += scif_ioctl.h
> -header-y += screen_info.h
> -header-y += sctp.h
> -header-y += sdla.h
> -header-y += seccomp.h
> -header-y += securebits.h
> -header-y += selinux_netlink.h
> -header-y += sem.h
> -header-y += serial_core.h
> -header-y += serial.h
> -header-y += serial_reg.h
> -header-y += serio.h
> -header-y += shm.h
> -header-y += signalfd.h
> -header-y += signal.h
> -header-y += smiapp.h
> -header-y += snmp.h
> -header-y += sock_diag.h
> -header-y += socket.h
> -header-y += sockios.h
> -header-y += sonet.h
> -header-y += sonypi.h
> -header-y += soundcard.h
> -header-y += sound.h
> -header-y += stat.h
> -header-y += stddef.h
> -header-y += string.h
> -header-y += suspend_ioctls.h
> -header-y += swab.h
> -header-y += synclink.h
> -header-y += sync_file.h
> -header-y += sysctl.h
> -header-y += sysinfo.h
> -header-y += target_core_user.h
> -header-y += taskstats.h
> -header-y += tcp.h
> -header-y += tcp_metrics.h
> -header-y += telephony.h
> -header-y += termios.h
> -header-y += thermal.h
> -header-y += time.h
> -header-y += times.h
> -header-y += timex.h
> -header-y += tiocl.h
> -header-y += tipc_config.h
> -header-y += tipc_netlink.h
> -header-y += tipc.h
> -header-y += toshiba.h
> -header-y += tty_flags.h
> -header-y += tty.h
> -header-y += types.h
> -header-y += udf_fs_i.h
> -header-y += udp.h
> -header-y += uhid.h
> -header-y += uinput.h
> -header-y += uio.h
> -header-y += uleds.h
> -header-y += ultrasound.h
> -header-y += un.h
> -header-y += unistd.h
> -header-y += unix_diag.h
> -header-y += usbdevice_fs.h
> -header-y += usbip.h
> -header-y += utime.h
> -header-y += utsname.h
> -header-y += uuid.h
> -header-y += uvcvideo.h
> -header-y += v4l2-common.h
> -header-y += v4l2-controls.h
> -header-y += v4l2-dv-timings.h
> -header-y += v4l2-mediabus.h
> -header-y += v4l2-subdev.h
> -header-y += veth.h
> -header-y += vfio.h
> -header-y += vhost.h
> -header-y += videodev2.h
> -header-y += virtio_9p.h
> -header-y += virtio_balloon.h
> -header-y += virtio_blk.h
> -header-y += virtio_config.h
> -header-y += virtio_console.h
> -header-y += virtio_gpu.h
> -header-y += virtio_ids.h
> -header-y += virtio_input.h
> -header-y += virtio_net.h
> -header-y += virtio_pci.h
> -header-y += virtio_ring.h
> -header-y += virtio_rng.h
> -header-y += virtio_scsi.h
> -header-y += virtio_types.h
> -header-y += virtio_vsock.h
> -header-y += virtio_crypto.h
> -header-y += vm_sockets.h
> -header-y += vt.h
> -header-y += vtpm_proxy.h
> -header-y += wait.h
> -header-y += wanrouter.h
> -header-y += watchdog.h
> -header-y += wimax.h
> -header-y += wireless.h
> -header-y += x25.h
> -header-y += xattr.h
> -header-y += xfrm.h
> -header-y += xilinx-v4l2-controls.h
> -header-y += zorro.h
> -header-y += zorro_ids.h
> -header-y += userfaultfd.h
> diff --git a/include/uapi/linux/android/Kbuild b/include/uapi/linux/android/Kbuild
> deleted file mode 100644
> index ca011eec252a..000000000000
> --- a/include/uapi/linux/android/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += binder.h
> diff --git a/include/uapi/linux/byteorder/Kbuild b/include/uapi/linux/byteorder/Kbuild
> deleted file mode 100644
> index 619225b9ff2e..000000000000
> --- a/include/uapi/linux/byteorder/Kbuild
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# UAPI Header export list
> -header-y += big_endian.h
> -header-y += little_endian.h
> diff --git a/include/uapi/linux/caif/Kbuild b/include/uapi/linux/caif/Kbuild
> deleted file mode 100644
> index 43396612d3a3..000000000000
> --- a/include/uapi/linux/caif/Kbuild
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# UAPI Header export list
> -header-y += caif_socket.h
> -header-y += if_caif.h
> diff --git a/include/uapi/linux/can/Kbuild b/include/uapi/linux/can/Kbuild
> deleted file mode 100644
> index 21c91bf25a29..000000000000
> --- a/include/uapi/linux/can/Kbuild
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -# UAPI Header export list
> -header-y += bcm.h
> -header-y += error.h
> -header-y += gw.h
> -header-y += netlink.h
> -header-y += raw.h
> diff --git a/include/uapi/linux/dvb/Kbuild b/include/uapi/linux/dvb/Kbuild
> deleted file mode 100644
> index d40942cfc627..000000000000
> --- a/include/uapi/linux/dvb/Kbuild
> +++ /dev/null
> @@ -1,9 +0,0 @@
> -# UAPI Header export list
> -header-y += audio.h
> -header-y += ca.h
> -header-y += dmx.h
> -header-y += frontend.h
> -header-y += net.h
> -header-y += osd.h
> -header-y += version.h
> -header-y += video.h
> diff --git a/include/uapi/linux/hdlc/Kbuild b/include/uapi/linux/hdlc/Kbuild
> deleted file mode 100644
> index 8c1d2cb75e33..000000000000
> --- a/include/uapi/linux/hdlc/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += ioctl.h
> diff --git a/include/uapi/linux/hsi/Kbuild b/include/uapi/linux/hsi/Kbuild
> deleted file mode 100644
> index a16a00544258..000000000000
> --- a/include/uapi/linux/hsi/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += hsi_char.h cs-protocol.h
> diff --git a/include/uapi/linux/iio/Kbuild b/include/uapi/linux/iio/Kbuild
> deleted file mode 100644
> index 86f76d84c44f..000000000000
> --- a/include/uapi/linux/iio/Kbuild
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# UAPI Header export list
> -header-y += events.h
> -header-y += types.h
> diff --git a/include/uapi/linux/isdn/Kbuild b/include/uapi/linux/isdn/Kbuild
> deleted file mode 100644
> index 89e52850bf29..000000000000
> --- a/include/uapi/linux/isdn/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += capicmd.h
> diff --git a/include/uapi/linux/mmc/Kbuild b/include/uapi/linux/mmc/Kbuild
> deleted file mode 100644
> index 8c1d2cb75e33..000000000000
> --- a/include/uapi/linux/mmc/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += ioctl.h
> diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild
> deleted file mode 100644
> index 03f194aeadc5..000000000000
> --- a/include/uapi/linux/netfilter/Kbuild
> +++ /dev/null
> @@ -1,89 +0,0 @@
> -# UAPI Header export list
> -header-y += ipset/
> -header-y += nf_conntrack_common.h
> -header-y += nf_conntrack_ftp.h
> -header-y += nf_conntrack_sctp.h
> -header-y += nf_conntrack_tcp.h
> -header-y += nf_conntrack_tuple_common.h
> -header-y += nf_log.h
> -header-y += nf_tables.h
> -header-y += nf_tables_compat.h
> -header-y += nf_nat.h
> -header-y += nfnetlink.h
> -header-y += nfnetlink_acct.h
> -header-y += nfnetlink_compat.h
> -header-y += nfnetlink_conntrack.h
> -header-y += nfnetlink_cthelper.h
> -header-y += nfnetlink_cttimeout.h
> -header-y += nfnetlink_log.h
> -header-y += nfnetlink_queue.h
> -header-y += x_tables.h
> -header-y += xt_AUDIT.h
> -header-y += xt_CHECKSUM.h
> -header-y += xt_CLASSIFY.h
> -header-y += xt_CONNMARK.h
> -header-y += xt_CONNSECMARK.h
> -header-y += xt_CT.h
> -header-y += xt_DSCP.h
> -header-y += xt_HMARK.h
> -header-y += xt_IDLETIMER.h
> -header-y += xt_LED.h
> -header-y += xt_LOG.h
> -header-y += xt_MARK.h
> -header-y += xt_NFLOG.h
> -header-y += xt_NFQUEUE.h
> -header-y += xt_RATEEST.h
> -header-y += xt_SECMARK.h
> -header-y += xt_SYNPROXY.h
> -header-y += xt_TCPMSS.h
> -header-y += xt_TCPOPTSTRIP.h
> -header-y += xt_TEE.h
> -header-y += xt_TPROXY.h
> -header-y += xt_addrtype.h
> -header-y += xt_bpf.h
> -header-y += xt_cgroup.h
> -header-y += xt_cluster.h
> -header-y += xt_comment.h
> -header-y += xt_connbytes.h
> -header-y += xt_connlabel.h
> -header-y += xt_connlimit.h
> -header-y += xt_connmark.h
> -header-y += xt_conntrack.h
> -header-y += xt_cpu.h
> -header-y += xt_dccp.h
> -header-y += xt_devgroup.h
> -header-y += xt_dscp.h
> -header-y += xt_ecn.h
> -header-y += xt_esp.h
> -header-y += xt_hashlimit.h
> -header-y += xt_helper.h
> -header-y += xt_ipcomp.h
> -header-y += xt_iprange.h
> -header-y += xt_ipvs.h
> -header-y += xt_l2tp.h
> -header-y += xt_length.h
> -header-y += xt_limit.h
> -header-y += xt_mac.h
> -header-y += xt_mark.h
> -header-y += xt_multiport.h
> -header-y += xt_nfacct.h
> -header-y += xt_osf.h
> -header-y += xt_owner.h
> -header-y += xt_physdev.h
> -header-y += xt_pkttype.h
> -header-y += xt_policy.h
> -header-y += xt_quota.h
> -header-y += xt_rateest.h
> -header-y += xt_realm.h
> -header-y += xt_recent.h
> -header-y += xt_rpfilter.h
> -header-y += xt_sctp.h
> -header-y += xt_set.h
> -header-y += xt_socket.h
> -header-y += xt_state.h
> -header-y += xt_statistic.h
> -header-y += xt_string.h
> -header-y += xt_tcpmss.h
> -header-y += xt_tcpudp.h
> -header-y += xt_time.h
> -header-y += xt_u32.h
> diff --git a/include/uapi/linux/netfilter/ipset/Kbuild b/include/uapi/linux/netfilter/ipset/Kbuild
> deleted file mode 100644
> index d2680423d9ab..000000000000
> --- a/include/uapi/linux/netfilter/ipset/Kbuild
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -# UAPI Header export list
> -header-y += ip_set.h
> -header-y += ip_set_bitmap.h
> -header-y += ip_set_hash.h
> -header-y += ip_set_list.h
> diff --git a/include/uapi/linux/netfilter_arp/Kbuild b/include/uapi/linux/netfilter_arp/Kbuild
> deleted file mode 100644
> index 62d5637cc0ac..000000000000
> --- a/include/uapi/linux/netfilter_arp/Kbuild
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# UAPI Header export list
> -header-y += arp_tables.h
> -header-y += arpt_mangle.h
> diff --git a/include/uapi/linux/netfilter_bridge/Kbuild b/include/uapi/linux/netfilter_bridge/Kbuild
> deleted file mode 100644
> index 0fbad8ef96de..000000000000
> --- a/include/uapi/linux/netfilter_bridge/Kbuild
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -# UAPI Header export list
> -header-y += ebt_802_3.h
> -header-y += ebt_among.h
> -header-y += ebt_arp.h
> -header-y += ebt_arpreply.h
> -header-y += ebt_ip.h
> -header-y += ebt_ip6.h
> -header-y += ebt_limit.h
> -header-y += ebt_log.h
> -header-y += ebt_mark_m.h
> -header-y += ebt_mark_t.h
> -header-y += ebt_nat.h
> -header-y += ebt_nflog.h
> -header-y += ebt_pkttype.h
> -header-y += ebt_redirect.h
> -header-y += ebt_stp.h
> -header-y += ebt_vlan.h
> -header-y += ebtables.h
> diff --git a/include/uapi/linux/netfilter_ipv4/Kbuild b/include/uapi/linux/netfilter_ipv4/Kbuild
> deleted file mode 100644
> index ecb291df390e..000000000000
> --- a/include/uapi/linux/netfilter_ipv4/Kbuild
> +++ /dev/null
> @@ -1,10 +0,0 @@
> -# UAPI Header export list
> -header-y += ip_tables.h
> -header-y += ipt_CLUSTERIP.h
> -header-y += ipt_ECN.h
> -header-y += ipt_LOG.h
> -header-y += ipt_REJECT.h
> -header-y += ipt_TTL.h
> -header-y += ipt_ah.h
> -header-y += ipt_ecn.h
> -header-y += ipt_ttl.h
> diff --git a/include/uapi/linux/netfilter_ipv6/Kbuild b/include/uapi/linux/netfilter_ipv6/Kbuild
> deleted file mode 100644
> index 75a668ca2353..000000000000
> --- a/include/uapi/linux/netfilter_ipv6/Kbuild
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -# UAPI Header export list
> -header-y += ip6_tables.h
> -header-y += ip6t_HL.h
> -header-y += ip6t_LOG.h
> -header-y += ip6t_NPT.h
> -header-y += ip6t_REJECT.h
> -header-y += ip6t_ah.h
> -header-y += ip6t_frag.h
> -header-y += ip6t_hl.h
> -header-y += ip6t_ipv6header.h
> -header-y += ip6t_mh.h
> -header-y += ip6t_opts.h
> -header-y += ip6t_rt.h
> diff --git a/include/uapi/linux/nfsd/Kbuild b/include/uapi/linux/nfsd/Kbuild
> deleted file mode 100644
> index c11bc404053c..000000000000
> --- a/include/uapi/linux/nfsd/Kbuild
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -# UAPI Header export list
> -header-y += cld.h
> -header-y += debug.h
> -header-y += export.h
> -header-y += nfsfh.h
> -header-y += stats.h
> diff --git a/include/uapi/linux/raid/Kbuild b/include/uapi/linux/raid/Kbuild
> deleted file mode 100644
> index e2c3d25405d7..000000000000
> --- a/include/uapi/linux/raid/Kbuild
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# UAPI Header export list
> -header-y += md_p.h
> -header-y += md_u.h
> diff --git a/include/uapi/linux/spi/Kbuild b/include/uapi/linux/spi/Kbuild
> deleted file mode 100644
> index 0cc747eff165..000000000000
> --- a/include/uapi/linux/spi/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += spidev.h
> diff --git a/include/uapi/linux/sunrpc/Kbuild b/include/uapi/linux/sunrpc/Kbuild
> deleted file mode 100644
> index 8e02e47c20fb..000000000000
> --- a/include/uapi/linux/sunrpc/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += debug.h
> diff --git a/include/uapi/linux/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild
> deleted file mode 100644
> index e3db7403296f..000000000000
> --- a/include/uapi/linux/tc_act/Kbuild
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -# UAPI Header export list
> -header-y += tc_csum.h
> -header-y += tc_defact.h
> -header-y += tc_gact.h
> -header-y += tc_ipt.h
> -header-y += tc_mirred.h
> -header-y += tc_nat.h
> -header-y += tc_pedit.h
> -header-y += tc_skbedit.h
> -header-y += tc_vlan.h
> -header-y += tc_bpf.h
> -header-y += tc_connmark.h
> -header-y += tc_ife.h
> -header-y += tc_tunnel_key.h
> -header-y += tc_skbmod.h
> diff --git a/include/uapi/linux/tc_ematch/Kbuild b/include/uapi/linux/tc_ematch/Kbuild
> deleted file mode 100644
> index 53fca3925535..000000000000
> --- a/include/uapi/linux/tc_ematch/Kbuild
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -# UAPI Header export list
> -header-y += tc_em_cmp.h
> -header-y += tc_em_meta.h
> -header-y += tc_em_nbyte.h
> -header-y += tc_em_text.h
> diff --git a/include/uapi/linux/usb/Kbuild b/include/uapi/linux/usb/Kbuild
> deleted file mode 100644
> index 4cc4d6e7e523..000000000000
> --- a/include/uapi/linux/usb/Kbuild
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -# UAPI Header export list
> -header-y += audio.h
> -header-y += cdc.h
> -header-y += cdc-wdm.h
> -header-y += ch11.h
> -header-y += ch9.h
> -header-y += functionfs.h
> -header-y += g_printer.h
> -header-y += gadgetfs.h
> -header-y += midi.h
> -header-y += tmc.h
> -header-y += video.h
> diff --git a/include/uapi/linux/wimax/Kbuild b/include/uapi/linux/wimax/Kbuild
> deleted file mode 100644
> index 1c97be49971f..000000000000
> --- a/include/uapi/linux/wimax/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += i2400m.h
> diff --git a/include/uapi/misc/Kbuild b/include/uapi/misc/Kbuild
> deleted file mode 100644
> index e96cae7d58c9..000000000000
> --- a/include/uapi/misc/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# misc Header export list
> -header-y += cxl.h
> diff --git a/include/uapi/mtd/Kbuild b/include/uapi/mtd/Kbuild
> deleted file mode 100644
> index 5a691e10cd0e..000000000000
> --- a/include/uapi/mtd/Kbuild
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -# UAPI Header export list
> -header-y += inftl-user.h
> -header-y += mtd-abi.h
> -header-y += mtd-user.h
> -header-y += nftl-user.h
> -header-y += ubi-user.h
> diff --git a/include/uapi/rdma/Kbuild b/include/uapi/rdma/Kbuild
> deleted file mode 100644
> index 82bdf5626859..000000000000
> --- a/include/uapi/rdma/Kbuild
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -# UAPI Header export list
> -header-y += ib_user_cm.h
> -header-y += ib_user_mad.h
> -header-y += ib_user_sa.h
> -header-y += ib_user_verbs.h
> -header-y += rdma_netlink.h
> -header-y += rdma_user_cm.h
> -header-y += hfi/
> -header-y += rdma_user_rxe.h
> -header-y += cxgb3-abi.h
> -header-y += cxgb4-abi.h
> -header-y += mlx4-abi.h
> -header-y += mlx5-abi.h
> -header-y += mthca-abi.h
> -header-y += nes-abi.h
> -header-y += ocrdma-abi.h
> -header-y += hns-abi.h
> -header-y += vmw_pvrdma-abi.h
> diff --git a/include/uapi/rdma/hfi/Kbuild b/include/uapi/rdma/hfi/Kbuild
> deleted file mode 100644
> index ef23c294fc71..000000000000
> --- a/include/uapi/rdma/hfi/Kbuild
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -# UAPI Header export list
> -header-y += hfi1_user.h
> diff --git a/include/uapi/scsi/Kbuild b/include/uapi/scsi/Kbuild
> deleted file mode 100644
> index d791e0ad509d..000000000000
> --- a/include/uapi/scsi/Kbuild
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -# UAPI Header export list
> -header-y += fc/
> -header-y += scsi_bsg_fc.h
> -header-y += scsi_netlink.h
> -header-y += scsi_netlink_fc.h
> -header-y += cxlflash_ioctl.h
> diff --git a/include/uapi/scsi/fc/Kbuild b/include/uapi/scsi/fc/Kbuild
> deleted file mode 100644
> index 5ead9fac265c..000000000000
> --- a/include/uapi/scsi/fc/Kbuild
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -# UAPI Header export list
> -header-y += fc_els.h
> -header-y += fc_fs.h
> -header-y += fc_gs.h
> -header-y += fc_ns.h
> diff --git a/include/uapi/sound/Kbuild b/include/uapi/sound/Kbuild
> deleted file mode 100644
> index 9578d8bdbf31..000000000000
> --- a/include/uapi/sound/Kbuild
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -# UAPI Header export list
> -header-y += asequencer.h
> -header-y += asoc.h
> -header-y += asound.h
> -header-y += asound_fm.h
> -header-y += compress_offload.h
> -header-y += compress_params.h
> -header-y += emu10k1.h
> -header-y += firewire.h
> -header-y += hdsp.h
> -header-y += hdspm.h
> -header-y += sb16_csp.h
> -header-y += sfnt_info.h
> -header-y += tlv.h
> -header-y += usb_stream.h
> -header-y += snd_sst_tokens.h
> diff --git a/include/uapi/video/Kbuild b/include/uapi/video/Kbuild
> deleted file mode 100644
> index ac7203bb32cc..000000000000
> --- a/include/uapi/video/Kbuild
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -# UAPI Header export list
> -header-y += edid.h
> -header-y += sisfb.h
> -header-y += uvesafb.h
> diff --git a/include/uapi/xen/Kbuild b/include/uapi/xen/Kbuild
> deleted file mode 100644
> index 5c459628e8c7..000000000000
> --- a/include/uapi/xen/Kbuild
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -# UAPI Header export list
> -header-y += evtchn.h
> -header-y += gntalloc.h
> -header-y += gntdev.h
> -header-y += privcmd.h
> diff --git a/include/video/Kbuild b/include/video/Kbuild
> deleted file mode 100644
> index e69de29bb2d1..000000000000
> diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
> index 876b42cfede4..bb93f8466a35 100644
> --- a/scripts/Makefile.headersinst
> +++ b/scripts/Makefile.headersinst
> @@ -1,17 +1,18 @@
> ?# ==========================================================================
> ?# Installing headers
> ?#
> -# header-y??- list files to be installed. They are preprocessed
> -#?????????????to remove __KERNEL__ section of the file
> -# genhdr-y??- Same as header-y but in a generated/ directory
> +# All headers under include/uapi, include/generated/uapi,
> +# arch/<arch>/include/uapi/asm and /include/generated/uapi/asm are exported.
> +# They are preprocessed to remove __KERNEL__ section of the file.
> ?#
> ?# ==========================================================================
> ?
> ?# generated header directory
> ?gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj)))
> ?
> +# Kbuild file is optional
> ?kbuild-file := $(srctree)/$(obj)/Kbuild
> -include $(kbuild-file)
> +-include $(kbuild-file)
> ?
> ?# called may set destination dir (when installing to asm/)
> ?_dst := $(if $(dst),$(dst),$(obj))
> @@ -25,9 +26,12 @@ include scripts/Kbuild.include
> ?
> ?installdir????:= $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst))
> ?
> -header-y??????:= $(sort $(header-y))
> -subdirs???????:= $(patsubst %/,%,$(filter %/, $(header-y)))
> -header-y??????:= $(filter-out %/, $(header-y))
> +subdirs???????:= $(patsubst $(srctree)/$(obj)/%/.,%,$(wildcard $(srctree)/$(obj)/*/.))
> +subdirs???????+= $(subdir-y)
> +header-files??:= $(notdir $(wildcard $(srctree)/$(obj)/*.h))
> +header-files??+= $(notdir $(wildcard $(srctree)/$(obj)/*.agh))
> +genhdr-files??:= $(notdir $(wildcard $(srctree)/$(gen)/*.h))
> +genhdr-files??:= $(filter-out $(header-files), $(genhdr-files))
> ?
> ?# files used to track state of install/check
> ?install-file??:= $(installdir)/.install
> @@ -35,26 +39,17 @@ check-file????:= $(installdir)/.check
> ?
> ?# generic-y list all files an architecture uses from asm-generic
> ?# Use this to build a list of headers which require a wrapper
> -wrapper-files := $(filter $(header-y), $(generic-y))
> +generic-files := $(notdir $(wildcard $(srctree)/include/uapi/asm-generic/*.h))
> +wrapper-files := $(filter $(generic-files), $(generic-y))
> +wrapper-files := $(filter-out $(header-files), $(wrapper-files))
> ?
> ?srcdir????????:= $(srctree)/$(obj)
> ?gendir????????:= $(objtree)/$(gen)
> ?
> ?# all headers files for this dir
> -header-y??????:= $(filter-out $(generic-y), $(header-y))
> -all-files?????:= $(header-y) $(genhdr-y) $(wrapper-files)
> +all-files?????:= $(header-files) $(genhdr-files) $(wrapper-files)
> ?output-files??:= $(addprefix $(installdir)/, $(all-files))
> ?
> -# Check that all expected files exist
> -$(foreach hdr, $(header-y), \
> -??$(if $(wildcard $(srcdir)/$(hdr)),, \
> -???????$(error Missing UAPI file $(srcdir)/$(hdr)) \
> -???))
> -$(foreach hdr, $(genhdr-y), \
> -??$(if $(wildcard $(gendir)/$(hdr)),, \
> -???????$(error Missing generated UAPI file $(gendir)/$(hdr)) \
> -??))
> -
> ?# Work out what needs to be removed
> ?oldheaders????:= $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
> ?unwanted??????:= $(filter-out $(all-files),$(oldheaders))
> @@ -67,8 +62,8 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
> ?quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
> ?????????????????????????????file$(if $(word 2, $(all-files)),s))
> ???????cmd_install = \
> -????????$(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-y); \
> -????????$(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-y); \
> +????????$(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-files); \
> +????????$(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-files); \
> ?????????for F in $(wrapper-files); do???????????????????????????????????\
> ?????????????????echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;????\
> ?????????done;???????????????????????????????????????????????????????????\
^ permalink raw reply
* [PATCH] PCI:MSI Return -ENOSPC when requested vectors is not enough
From: Bjorn Helgaas @ 2017-01-11 18:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1480558504-18691-1-git-send-email-dennis.chen@arm.com>
On Thu, Dec 01, 2016 at 10:15:04AM +0800, Dennis Chen wrote:
> The __pci_enable_msi_range() should return -ENOSPC instead of -EINVAL
> when the device doesn't have enough vectors as required, just as the
> MSI-X vector allocator does in __pci_enable_msix_range(). Otherwise,
> some drivers depending on that return value will probably fallback to
> the legacy interrupt directly, for example, in commit 17a51f12cfbd2814
> ("ahci: only try to use multi-MSI mode if there is more than 1 port"), the
> ahci driver will fallback to single MSI mode only when the return value
> is -ENOSPC in case of required vectors is not enough, else the driver will
> use legacy interrupt which has been observed on a x86 box with 6-port SATA
> controller.
Unless Christoph objects, I'll apply this, but I don't understand the
situation with 17a51f12cfbd. That commit doesn't check for EINVAL or
ENOSPC so I don't know what the connection with this patch is.
I know Christoph said he changed something in ahci to treat all errors
the same, but I don't know where that is, either.
If there's a revision of Linus' tree that is broken, please give the
details so I can at least describe which versions are broken, when it
got fixed by Christoph, and figure out whether we need stable
backports or anything.
Bjorn
> With this patch, when a MSI-capable device doesn't have enough MSI
> vectors as requested, it will fallback to single MSI mode while not
> legacy interrupt.
>
> Signed-off-by: Dennis Chen <dennis.chen@arm.com>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Steve Capper <steve.capper@arm.com>
> Cc: linux-ide at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> ---
> drivers/pci/msi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index ad70507..da37113 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -1084,7 +1084,7 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
> if (nvec < 0)
> return nvec;
> if (nvec < minvec)
> - return -EINVAL;
> + return -ENOSPC;
>
> if (nvec > maxvec)
> nvec = maxvec;
> --
> 2.7.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Marc Zyngier @ 2017-01-11 18:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170111180627.GG20288@e104818-lin.cambridge.arm.com>
On 11/01/17 18:06, Catalin Marinas wrote:
> Some minor comments below, nothing fundamental (as long as you say the
> new sequence doesn't have the speculative TLB load problem I mentioned
> on a previous version).
>
> On Wed, Jan 11, 2017 at 09:41:15AM -0500, Christopher Covington wrote:
>> diff --git a/Documentation/arm64/silicon-errata.txt b/Documentation/arm64/silicon-errata.txt
>> index 405da11..7151aed 100644
>> --- a/Documentation/arm64/silicon-errata.txt
>> +++ b/Documentation/arm64/silicon-errata.txt
>> @@ -42,24 +42,25 @@ file acts as a registry of software workarounds in the Linux Kernel and
>> will be updated when new workarounds are committed and backported to
>> stable kernels.
>>
>> -| Implementor | Component | Erratum ID | Kconfig |
>> -+----------------+-----------------+-----------------+-------------------------+
>> -| ARM | Cortex-A53 | #826319 | ARM64_ERRATUM_826319 |
>> -| ARM | Cortex-A53 | #827319 | ARM64_ERRATUM_827319 |
>> -| ARM | Cortex-A53 | #824069 | ARM64_ERRATUM_824069 |
>> -| ARM | Cortex-A53 | #819472 | ARM64_ERRATUM_819472 |
>> -| ARM | Cortex-A53 | #845719 | ARM64_ERRATUM_845719 |
>> -| ARM | Cortex-A53 | #843419 | ARM64_ERRATUM_843419 |
>> -| ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 |
>> -| ARM | Cortex-A57 | #852523 | N/A |
>> -| ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 |
>> -| ARM | Cortex-A72 | #853709 | N/A |
>> -| ARM | MMU-500 | #841119,#826419 | N/A |
>> -| | | | |
>> -| Cavium | ThunderX ITS | #22375, #24313 | CAVIUM_ERRATUM_22375 |
>> -| Cavium | ThunderX ITS | #23144 | CAVIUM_ERRATUM_23144 |
>> -| Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 |
>> -| Cavium | ThunderX Core | #27456 | CAVIUM_ERRATUM_27456 |
>> -| Cavium | ThunderX SMMUv2 | #27704 | N/A |
>> -| | | | |
>> -| Freescale/NXP | LS2080A/LS1043A | A-008585 | FSL_ERRATUM_A008585 |
>> +| Implementor | Component | Erratum ID | Kconfig |
>> ++---------------+-----------------+-----------------+--------------------------+
>> +| ARM | Cortex-A53 | #826319 | ARM64_ERRATUM_826319 |
>> +| ARM | Cortex-A53 | #827319 | ARM64_ERRATUM_827319 |
>> +| ARM | Cortex-A53 | #824069 | ARM64_ERRATUM_824069 |
>> +| ARM | Cortex-A53 | #819472 | ARM64_ERRATUM_819472 |
>> +| ARM | Cortex-A53 | #845719 | ARM64_ERRATUM_845719 |
>> +| ARM | Cortex-A53 | #843419 | ARM64_ERRATUM_843419 |
>> +| ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 |
>> +| ARM | Cortex-A57 | #852523 | N/A |
>> +| ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 |
>> +| ARM | Cortex-A72 | #853709 | N/A |
>> +| ARM | MMU-500 | #841119,#826419 | N/A |
>> +| | | | |
>> +| Cavium | ThunderX ITS | #22375, #24313 | CAVIUM_ERRATUM_22375 |
>> +| Cavium | ThunderX ITS | #23144 | CAVIUM_ERRATUM_23144 |
>> +| Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 |
>> +| Cavium | ThunderX Core | #27456 | CAVIUM_ERRATUM_27456 |
>> +| Cavium | ThunderX SMMUv2 | #27704 | N/A |
>> +| | | | |
>> +| Freescale/NXP | LS2080A/LS1043A | A-008585 | FSL_ERRATUM_A008585 |
>> +| Qualcomm | Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 |
>
> Please don't change the "Implementor" column width, there is no point
> and it makes the patch harder to read (i.e. this hunk should only have
> one line).
>
>> diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c
>> index 4c63cb1..5a0a82a 100644
>> --- a/arch/arm64/mm/context.c
>> +++ b/arch/arm64/mm/context.c
>> @@ -87,6 +87,11 @@ static void flush_context(unsigned int cpu)
>> /* Update the list of reserved ASIDs and the ASID bitmap. */
>> bitmap_clear(asid_map, 0, NUM_USER_ASIDS);
>>
>> + /* Reserve ASID for Falkor erratum 1003 */
>> + if (IS_ENABLED(CONFIG_QCOM_FALKOR_ERRATUM_1003) &&
>> + cpus_have_cap(ARM64_WORKAROUND_QCOM_FALKOR_E1003))
>> + __set_bit(FALKOR_RESERVED_ASID, asid_map);
>> +
>> /*
>> * Ensure the generation bump is observed before we xchg the
>> * active_asids.
>> @@ -244,6 +249,11 @@ static int asids_init(void)
>> panic("Failed to allocate bitmap for %lu ASIDs\n",
>> NUM_USER_ASIDS);
>>
>> + /* Reserve ASID for Falkor erratum 1003 */
>> + if (IS_ENABLED(CONFIG_QCOM_FALKOR_ERRATUM_1003) &&
>> + cpus_have_cap(ARM64_WORKAROUND_QCOM_FALKOR_E1003))
>> + __set_bit(FALKOR_RESERVED_ASID, asid_map);
>> +
>> pr_info("ASID allocator initialised with %lu entries\n", NUM_USER_ASIDS);
>> return 0;
>> }
>
> You could as well write a small static function in this file and call it
> twice.
>
>> diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
>> index 32682be..9ee46df 100644
>> --- a/arch/arm64/mm/proc.S
>> +++ b/arch/arm64/mm/proc.S
>> @@ -23,6 +23,7 @@
>> #include <asm/assembler.h>
>> #include <asm/asm-offsets.h>
>> #include <asm/hwcap.h>
>> +#include <asm/mmu_context.h>
>> #include <asm/pgtable.h>
>> #include <asm/pgtable-hwdef.h>
>> #include <asm/cpufeature.h>
>> @@ -140,6 +141,18 @@ ENDPROC(cpu_do_resume)
>> ENTRY(cpu_do_switch_mm)
>> mmid x1, x1 // get mm->context.id
>> bfi x0, x1, #48, #16 // set the ASID
>> +#ifdef CONFIG_QCOM_FALKOR_ERRATUM_1003
>> +alternative_if ARM64_WORKAROUND_QCOM_FALKOR_E1003
>> + mrs x2, ttbr0_el1
>> + mov x3, #FALKOR_RESERVED_ASID
>> + bfi x2, x3, #48, #16 // reserved ASID + old BADDR
>> + msr ttbr0_el1, x2
>> + isb
>> + bfi x2, x0, #0, #48 // reserved ASID + new BADDR
>> + msr ttbr0_el1, x2
>> + isb
>> +alternative_else_nop_endif
>> +#endif
>> msr ttbr0_el1, x0 // set TTBR0
>> isb
>> post_ttbr0_update_workaround
>
> Please move the above hunk to a pre_ttbr0_update_workaround macro for
> consistency with post_ttbr0_update_workaround.
In which case (and also for consistency), should we add that pre_ttbr0
macro to entry.S, just before __uaccess_ttbr0_enable? It may not be
needed in the SW pan case, but it is probably worth entertaining the
idea that there may be something to do there...
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply
* [RFC PATCH 1/2] ARM: vfp - allow kernel mode NEON in softirq context
From: Ard Biesheuvel @ 2017-01-11 18:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170111175649.GK14217@n2100.armlinux.org.uk>
On 11 January 2017 at 17:56, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> On Mon, Jan 09, 2017 at 07:57:28PM +0000, Ard Biesheuvel wrote:
>> This updates the kernel mode NEON handling to allow the NEON to be used
>> in softirq context as well as process context. This involves disabling
>> softirq processing when the NEON is used in kernel mode in process context,
>> and dealing with the situation where 'current' is not the owner of the
>> userland context that is present in the NEON register file when the NEON
>> is enabled in kernel mode.
>
> I really don't like this idea as-is.
>
> We have cases where kernel code accesses VFP to (eg) save or restore
> register state, such as during signal handling. We assume that this
> will not be interrupted by another user, and that if we enable access
> to the VFP, it will stay enabled. If it gets disabled beneath us, then
> things won't go well.
>
> For example, consider vfp_sync_hwstate():
>
> vfp_sync_hwstate()
> vfp_state_in_hw() => true
> fpexc read
> softirq happens
> kernel_neon_begin()
> kernel_neon_end()
> fpexc re-enabled
> current register state saved out (corrupting what was there)
> fpexc restored, possible in an enabled state
>
> Or we could have:
>
> vfp_sync_hwstate()
> vfp_state_in_hw() => true
> softirq happens
> kernel_neon_begin()
> kernel_neon_end()
> fpexc read
> fpexc re-enabled
> current register state saved out (corrupting what was there)
> fpexc disabled
>
> Or worse:
>
> vfp_sync_hwstate()
> vfp_state_in_hw() => true
> fpexc read
> fpexc re-enabled
> softirq happens
> kernel_neon_begin()
> kernel_neon_end()
> current register state saved out, blowing up because VFP is
> unexpectedly disabled
>
> So we would need to disable softirqs around every sensitive point in the
> VFP support code, and over all VFP instruction emulations for those VFPs
> which bounce "difficult" operations to the kernel support code.
>
Ah yes, I should have known it couldn't be that simple.
Thanks for the critique: i will look into the impact of making these changes.
>> The rationale for this change is that the NEON is shared with the ARMv8
>> Crypto Extensions (which are also defined for the AArch32 execution state),
>> which can give a huge performance boost (15x) to use cases like mac80211
>> CCMP processing, which executes in softirq context.
>
> I think, once the implementation is more correct, this would need to
> be re-evaluated, and I'd also like other more general performance
> measurements as well (eg, latency.)
>
Re latency, I thought about adding a kernel_neon_yield(), which does a
kernel_neon_end()/do_softirq()/kernel_neon_begin() sequence if any
softirqs are pending, to be invoked by kernel mode NEON users at times
when there are no live NEON registers. But in-kernel users of the
crypto API are naturally quantised into disk sectors, pages or network
packets, so I would not expect any noticeable starvation to occur. But
that does mean such algorithms should not be exposed to userland
(which sounds like a bad idea in any case, given that userland can
simply execute the same instructions)
^ permalink raw reply
* [PATCH v2] arm64: do not set dma masks that device connection can't handle
From: Robin Murphy @ 2017-01-11 18:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <7c6a1523-e41b-ad83-501a-27c260b9f9ee@cogentembedded.com>
On 11/01/17 12:37, Nikita Yushchenko wrote:
>> I actually have a third variation of this problem involving a PCI root
>> complex which *could* drive full-width (40-bit) addresses, but won't,
>> due to the way its PCI<->AXI interface is programmed. That would require
>> even more complicated dma-ranges handling to describe the windows of
>> valid physical addresses which it *will* pass, so I'm not pressing the
>> issue - let's just get the basic DMA mask case fixed first.
>
> R-Car + NVMe is actually not "basic case".
I meant "basic" in terms of what needs to be done in Linux - simply
preventing device drivers from overwriting the DT-configured DMA mask
will make everything work as well as well as it possibly can on R-Car,
both with or without the IOMMU, since apparently all you need is to
ensure a PCI device never gets given a DMA address above 4GB. The
situation where PCI devices *can* DMA to all of physical memory, but
can't use arbitrary addresses *outside* it - which only becomes a
problem with an IOMMU - is considerably trickier.
> It has PCI<->AXI interface involved.
> PCI addresses are 64-bit and controller does handle 64-bit addresses
> there. Mapping between PCI addresses and AXI addresses is defined. But
> AXI is 32-bit.
>
> SoC has iommu that probably could be used between PCIe module and RAM.
> Although AFAIK nobody made that working yet.
>
> Board I work with has 4G of RAM, in 4 banks, located at different parts
> of wide address space, and only one of them is below 4G. But if iommu is
> capable of translating addresses such that 4 gigabyte banks map to first
> 4 gigabytes of address space, then all memory will become available for
> DMA from PCIe device.
The aforementioned situation on Juno is similar yet different - the PLDA
XR3 root complex uses an address-based lookup table to translate
outgoing PCI memory space transactions to AXI bus addresses with the
appropriate attributes, in power-of-two-sized regions. The firmware
configures 3 LUT entries - 2GB at 0x8000_0000 and 8GB at 0x8_8000_0000
with cache-coherent attributes to cover the DRAM areas, plus a small one
with device attributes covering the GICv2m MSI frame. The issue is that
there is no "no match" translation, so any transaction not within one of
those regions never makes it out of the root complex at all.
That's fine in normal operation, as there's nothing outside those
regions in the physical memory map a PCI device should be accessing
anyway, but turning on the SMMU is another matter - since the IOVA
allocator runs top-down, a PCI device with a 64-bit DMA mask will do a
dma_map or dma_alloc, get the physical page mapped to an IOVA up around
FF_FFFF_F000 (the SMMU will constrain things to the system bus width of
40 bits), then try to access that address and get a termination straight
back from the RC. Similarly, A KVM guest which wants to place its memory
at arbitrary locations and expect device passthrough to work is going to
have a bad time.
I don't know if it's feasible to have the firmware set the LUT up
differently, as that might lead to other problems when not using the
SMMU, and/or just require far more than the 8 available LUT entries
(assuming they have to be non-overlapping - I'm not 100% sure and
documentation is sparse). Thus it seems appropriate to describe the
currently valid PCI-AXI translations with dma-ranges, but then we'd have
multiple entries - last time I looked Linux simply ignores all but the
last one in that case - which can't be combined into a simple bitmask,
so I'm not entirely sure where to go from there. Especially as so far it
seems to be a problem exclusive to one not-widely-available ageing
early-access development platform...
It happens that limiting all PCI DMA masks to 32 bits would bodge around
this problem thanks to the current IOVA allocator behaviour, but that's
pretty yuck, and would force unnecessary bouncing for the non-SMMU case.
My other hack to carve up IOVA domains to reserve all addresses not
matching memblocks is hardly any more realistic, hence why the SMMU is
in the Juno DT in a change-it-at-your-own-peril "disabled" state ;)
Robin.
^ permalink raw reply
* [PATCH] PCI: mvebu: Handle changes to the bridge windows while enabled
From: Bjorn Helgaas @ 2017-01-11 18:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161212183020.GA30274@obsidianresearch.com>
On Mon, Dec 12, 2016 at 11:30:20AM -0700, Jason Gunthorpe wrote:
> The PCI core will write to the bridge window config multiple times
> while they are enabled. This can lead to mbus failures like:
>
> mvebu_mbus: cannot add window '4:e8', conflicts with another window
> mvebu-pcie mbus:pex at e0000000: Could not create MBus window at [mem 0xe0000000-0xe00fffff]: -22
>
> For me this is happening during a hotplug cycle. The PCI core is
> not changing the values, just writing them twice while active.
>
> The patch addresses the general case of any change to an active window,
> but not atomically. The code is slightly refactored so io and mem
> can share more of the window logic.
Looks good to me, but I'm waiting for an ack from Thomas or Jason (listed
as maintainers and already cc'd).
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> ---
> drivers/pci/host/pci-mvebu.c | 101 +++++++++++++++++++++++++------------------
> 1 file changed, 60 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
> index 307f81d6b479af..af724731b22f53 100644
> --- a/drivers/pci/host/pci-mvebu.c
> +++ b/drivers/pci/host/pci-mvebu.c
> @@ -133,6 +133,12 @@ struct mvebu_pcie {
> int nports;
> };
>
> +struct mvebu_pcie_window {
> + phys_addr_t base;
> + phys_addr_t remap;
> + size_t size;
> +};
> +
> /* Structure representing one PCIe interface */
> struct mvebu_pcie_port {
> char *name;
> @@ -150,10 +156,8 @@ struct mvebu_pcie_port {
> struct mvebu_sw_pci_bridge bridge;
> struct device_node *dn;
> struct mvebu_pcie *pcie;
> - phys_addr_t memwin_base;
> - size_t memwin_size;
> - phys_addr_t iowin_base;
> - size_t iowin_size;
> + struct mvebu_pcie_window memwin;
> + struct mvebu_pcie_window iowin;
> u32 saved_pcie_stat;
> };
>
> @@ -379,23 +383,45 @@ static void mvebu_pcie_add_windows(struct mvebu_pcie_port *port,
> }
> }
>
> +static void mvebu_pcie_set_window(struct mvebu_pcie_port *port,
> + unsigned int target, unsigned int attribute,
> + const struct mvebu_pcie_window *desired,
> + struct mvebu_pcie_window *cur)
> +{
> + if (desired->base == cur->base && desired->remap == cur->remap &&
> + desired->size == cur->size)
> + return;
> +
> + if (cur->size != 0) {
> + mvebu_pcie_del_windows(port, cur->base, cur->size);
> + cur->size = 0;
> + cur->base = 0;
> +
> + /*
> + * If something tries to change the window while it is enabled
> + * the change will not be done atomically. That would be
> + * difficult to do in the general case.
> + */
> + }
> +
> + if (desired->size == 0)
> + return;
> +
> + mvebu_pcie_add_windows(port, target, attribute, desired->base,
> + desired->size, desired->remap);
> + *cur = *desired;
> +}
> +
> static void mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port)
> {
> - phys_addr_t iobase;
> + struct mvebu_pcie_window desired = {};
>
> /* Are the new iobase/iolimit values invalid? */
> if (port->bridge.iolimit < port->bridge.iobase ||
> port->bridge.iolimitupper < port->bridge.iobaseupper ||
> !(port->bridge.command & PCI_COMMAND_IO)) {
> -
> - /* If a window was configured, remove it */
> - if (port->iowin_base) {
> - mvebu_pcie_del_windows(port, port->iowin_base,
> - port->iowin_size);
> - port->iowin_base = 0;
> - port->iowin_size = 0;
> - }
> -
> + mvebu_pcie_set_window(port, port->io_target, port->io_attr,
> + &desired, &port->iowin);
> return;
> }
>
> @@ -412,32 +438,27 @@ static void mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port)
> * specifications. iobase is the bus address, port->iowin_base
> * is the CPU address.
> */
> - iobase = ((port->bridge.iobase & 0xF0) << 8) |
> - (port->bridge.iobaseupper << 16);
> - port->iowin_base = port->pcie->io.start + iobase;
> - port->iowin_size = ((0xFFF | ((port->bridge.iolimit & 0xF0) << 8) |
> - (port->bridge.iolimitupper << 16)) -
> - iobase) + 1;
> -
> - mvebu_pcie_add_windows(port, port->io_target, port->io_attr,
> - port->iowin_base, port->iowin_size,
> - iobase);
> + desired.remap = ((port->bridge.iobase & 0xF0) << 8) |
> + (port->bridge.iobaseupper << 16);
> + desired.base = port->pcie->io.start + desired.remap;
> + desired.size = ((0xFFF | ((port->bridge.iolimit & 0xF0) << 8) |
> + (port->bridge.iolimitupper << 16)) -
> + desired.remap) +
> + 1;
> +
> + mvebu_pcie_set_window(port, port->io_target, port->io_attr, &desired,
> + &port->iowin);
> }
>
> static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port)
> {
> + struct mvebu_pcie_window desired = {.remap = MVEBU_MBUS_NO_REMAP};
> +
> /* Are the new membase/memlimit values invalid? */
> if (port->bridge.memlimit < port->bridge.membase ||
> !(port->bridge.command & PCI_COMMAND_MEMORY)) {
> -
> - /* If a window was configured, remove it */
> - if (port->memwin_base) {
> - mvebu_pcie_del_windows(port, port->memwin_base,
> - port->memwin_size);
> - port->memwin_base = 0;
> - port->memwin_size = 0;
> - }
> -
> + mvebu_pcie_set_window(port, port->mem_target, port->mem_attr,
> + &desired, &port->memwin);
> return;
> }
>
> @@ -447,14 +468,12 @@ static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port)
> * window to setup, according to the PCI-to-PCI bridge
> * specifications.
> */
> - port->memwin_base = ((port->bridge.membase & 0xFFF0) << 16);
> - port->memwin_size =
> - (((port->bridge.memlimit & 0xFFF0) << 16) | 0xFFFFF) -
> - port->memwin_base + 1;
> -
> - mvebu_pcie_add_windows(port, port->mem_target, port->mem_attr,
> - port->memwin_base, port->memwin_size,
> - MVEBU_MBUS_NO_REMAP);
> + desired.base = ((port->bridge.membase & 0xFFF0) << 16);
> + desired.size = (((port->bridge.memlimit & 0xFFF0) << 16) | 0xFFFFF) -
> + desired.base + 1;
> +
> + mvebu_pcie_set_window(port, port->mem_target, port->mem_attr, &desired,
> + &port->memwin);
> }
>
> /*
> --
> 2.7.4
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [RFC PATCH 1/2] ARM: vfp - allow kernel mode NEON in softirq context
From: Russell King - ARM Linux @ 2017-01-11 18:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAKv+Gu9S66y0QuOcJdwrT-WoQOCJged-MzfXqdm20RYVGg9w8w@mail.gmail.com>
On Wed, Jan 11, 2017 at 06:23:10PM +0000, Ard Biesheuvel wrote:
> Re latency, I thought about adding a kernel_neon_yield(), which does a
> kernel_neon_end()/do_softirq()/kernel_neon_begin() sequence if any
> softirqs are pending, to be invoked by kernel mode NEON users at times
> when there are no live NEON registers. But in-kernel users of the
> crypto API are naturally quantised into disk sectors, pages or network
> packets, so I would not expect any noticeable starvation to occur. But
> that does mean such algorithms should not be exposed to userland
> (which sounds like a bad idea in any case, given that userland can
> simply execute the same instructions)
I was actually thinking about the impact of adding softirq disabling
over much of the VFP code necessary to make this safe, rather than the
softirq disable coming from the kernel mode neon itself.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply
* [PATCH 0/2] arm64: fix handling of DMA masks wider than bus supports
From: Nikita Yushchenko @ 2017-01-11 18:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <dca35acf-1adf-aa85-7a0b-d0c6ec702fa1@arm.com>
> I reckon the easiest way forward would be to pass in some flag to
> arch_setup_dma_ops to indicate whether it's an explicitly-configured
> range or not - then simply initialising parent_dma_mask to ~0 for the
> default case *should* keep things working as before.
Tried to do that.
---
Nikita Yushchenko (2):
dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()
arm64: avoid increasing DMA masks above what hardware supports
arch/arm/include/asm/dma-mapping.h | 1 +
arch/arm/mm/dma-mapping.c | 3 +-
arch/arm64/Kconfig | 3 ++
arch/arm64/include/asm/device.h | 1 +
arch/arm64/include/asm/dma-mapping.h | 6 +++-
arch/arm64/mm/dma-mapping.c | 43 +++++++++++++++++++++++++-
arch/mips/include/asm/dma-mapping.h | 3 +-
drivers/acpi/scan.c | 2 +-
drivers/iommu/rockchip-iommu.c | 2 +-
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
drivers/of/device.c | 5 ++-
drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 2 +-
12 files changed, 64 insertions(+), 9 deletions(-)
--
2.1.4
^ permalink raw reply
* [PATCH 1/2] dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops()
From: Nikita Yushchenko @ 2017-01-11 18:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1484159512-28515-1-git-send-email-nikita.yoush@cogentembedded.com>
There are cases when device is capable of wide DMA mask (and driver
issues corresponding dma_set_mask() call), but bus device sits on can't
support wide address. Example: NVMe device behind PCIe controller
sitting on 32-bit SoC bus.
To support such case, architecture needs information about such
limitations. Such information can originate from dma-ranges property
in device tree, and is passed to architecture via arch_setup_dma_ops()
call.
Problem is that in wide majority of cases, no dma range is defined.
E.g. ACPI has no means to define it. Thus default range (usually
full 32-bit range, i.e. 4G starting at zero address) is passed instead.
If architecture enforce this range, all setups currently using
wide DMA addresses without explicitly defining support for that via
device tree will break. This is bad, especially for ACPI based
platforms.
To avoid that, this patch adds additional boolean argument to
arch_setup_dma_ops() to show if range originates from authorative source
and thus should be enforced, or is just a guess and should be handled as
such.
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
arch/arm/include/asm/dma-mapping.h | 1 +
arch/arm/mm/dma-mapping.c | 3 ++-
arch/arm64/include/asm/dma-mapping.h | 3 ++-
arch/arm64/mm/dma-mapping.c | 3 ++-
arch/mips/include/asm/dma-mapping.h | 3 ++-
drivers/acpi/scan.c | 2 +-
drivers/iommu/rockchip-iommu.c | 2 +-
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
drivers/of/device.c | 5 ++++-
drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 2 +-
10 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index bf02dbd..2a3863e 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -117,6 +117,7 @@ static inline unsigned long dma_max_pfn(struct device *dev)
#define arch_setup_dma_ops arch_setup_dma_ops
extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
+ bool enforce_range,
const struct iommu_ops *iommu, bool coherent);
#define arch_teardown_dma_ops arch_teardown_dma_ops
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ab77100..b8b11f8 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -2380,7 +2380,8 @@ static struct dma_map_ops *arm_get_dma_map_ops(bool coherent)
}
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
- const struct iommu_ops *iommu, bool coherent)
+ bool enforce_range, const struct iommu_ops *iommu,
+ bool coherent)
{
struct dma_map_ops *dma_ops;
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index ccea82c..ae1c23f 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -48,7 +48,8 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
}
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
- const struct iommu_ops *iommu, bool coherent);
+ bool enforce_range, const struct iommu_ops *iommu,
+ bool coherent);
#define arch_setup_dma_ops arch_setup_dma_ops
#ifdef CONFIG_IOMMU_DMA
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index e040827..ea295f1 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -953,7 +953,8 @@ static void __iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
#endif /* CONFIG_IOMMU_DMA */
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
- const struct iommu_ops *iommu, bool coherent)
+ bool enforce_range, const struct iommu_ops *iommu,
+ bool coherent)
{
if (!dev->archdata.dma_ops)
dev->archdata.dma_ops = &swiotlb_dma_ops;
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
index 7aa71b9..6af4d87 100644
--- a/arch/mips/include/asm/dma-mapping.h
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -34,7 +34,8 @@ extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
#define arch_setup_dma_ops arch_setup_dma_ops
static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
- u64 size, const struct iommu_ops *iommu,
+ u64 size, bool enforce_range,
+ const struct iommu_ops *iommu,
bool coherent)
{
#ifdef CONFIG_DMA_PERDEV_COHERENT
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 1926918..dea17a5 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1385,7 +1385,7 @@ void acpi_dma_configure(struct device *dev, enum dev_dma_attr attr)
* Assume dma valid range starts at 0 and covers the whole
* coherent_dma_mask.
*/
- arch_setup_dma_ops(dev, 0, dev->coherent_dma_mask + 1, iommu,
+ arch_setup_dma_ops(dev, 0, dev->coherent_dma_mask + 1, false, iommu,
attr == DEV_DMA_COHERENT);
}
EXPORT_SYMBOL_GPL(acpi_dma_configure);
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 9afcbf7..0995ab3 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -1096,7 +1096,7 @@ static int rk_iommu_domain_probe(struct platform_device *pdev)
return -ENOMEM;
/* Set dma_ops for dev, otherwise it would be dummy_dma_ops */
- arch_setup_dma_ops(dev, 0, DMA_BIT_MASK(32), NULL, false);
+ arch_setup_dma_ops(dev, 0, DMA_BIT_MASK(32), false, NULL, false);
dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index c9b7ad6..19f70d8 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2533,7 +2533,7 @@ static int dpaa_eth_probe(struct platform_device *pdev)
priv->buf_layout[TX].priv_data_size = DPAA_TX_PRIV_DATA_SIZE; /* Tx */
/* device used for DMA mapping */
- arch_setup_dma_ops(dev, 0, 0, NULL, false);
+ arch_setup_dma_ops(dev, 0, 0, false, NULL, false);
err = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(40));
if (err) {
dev_err(dev, "dma_coerce_mask_and_coherent() failed\n");
diff --git a/drivers/of/device.c b/drivers/of/device.c
index fd5cfad..1cc2115 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -89,6 +89,7 @@ void of_dma_configure(struct device *dev, struct device_node *np)
bool coherent;
unsigned long offset;
const struct iommu_ops *iommu;
+ bool enforce_range = false;
/*
* Set default coherent_dma_mask to 32 bit. Drivers are expected to
@@ -126,6 +127,8 @@ void of_dma_configure(struct device *dev, struct device_node *np)
return;
}
dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
+
+ enforce_range = true;
}
dev->dma_pfn_offset = offset;
@@ -147,7 +150,7 @@ void of_dma_configure(struct device *dev, struct device_node *np)
dev_dbg(dev, "device is%sbehind an iommu\n",
iommu ? " " : " not ");
- arch_setup_dma_ops(dev, dma_addr, size, iommu, coherent);
+ arch_setup_dma_ops(dev, dma_addr, size, enforce_range, iommu, coherent);
}
EXPORT_SYMBOL_GPL(of_dma_configure);
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
index 5ac373c..480b644 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
@@ -540,7 +540,7 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
/* Objects are coherent, unless 'no shareability' flag set. */
if (!(obj_desc->flags & DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY))
- arch_setup_dma_ops(&mc_dev->dev, 0, 0, NULL, true);
+ arch_setup_dma_ops(&mc_dev->dev, 0, 0, false, NULL, true);
/*
* The device-specific probe callback will get invoked by device_add()
--
2.1.4
^ permalink raw reply related
* [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports
From: Nikita Yushchenko @ 2017-01-11 18:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1484159512-28515-1-git-send-email-nikita.yoush@cogentembedded.com>
There are cases when device supports wide DMA addresses wider than
device's connection supports.
In this case driver sets DMA mask based on knowledge of device
capabilities. That must succeed to allow drivers to initialize.
However, swiotlb or iommu still need knowledge about actual device
capabilities. To avoid breakage, actual mask must not be set wider than
device connection allows.
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Robin Murphy <robin.murphy@arm.com>
CC: Will Deacon <will.deacon@arm.com>
---
arch/arm64/Kconfig | 3 +++
arch/arm64/include/asm/device.h | 1 +
arch/arm64/include/asm/dma-mapping.h | 3 +++
arch/arm64/mm/dma-mapping.c | 40 ++++++++++++++++++++++++++++++++++++
4 files changed, 47 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1117421..afb2c08 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -216,6 +216,9 @@ config NEED_DMA_MAP_STATE
config NEED_SG_DMA_LENGTH
def_bool y
+config ARCH_HAS_DMA_SET_COHERENT_MASK
+ def_bool y
+
config SMP
def_bool y
diff --git a/arch/arm64/include/asm/device.h b/arch/arm64/include/asm/device.h
index 243ef25..a57e7bb 100644
--- a/arch/arm64/include/asm/device.h
+++ b/arch/arm64/include/asm/device.h
@@ -22,6 +22,7 @@ struct dev_archdata {
void *iommu; /* private IOMMU data */
#endif
bool dma_coherent;
+ u64 parent_dma_mask;
};
struct pdev_archdata {
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index ae1c23f..46b53e6 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -52,6 +52,9 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
bool coherent);
#define arch_setup_dma_ops arch_setup_dma_ops
+#define HAVE_ARCH_DMA_SET_MASK 1
+extern int dma_set_mask(struct device *dev, u64 dma_mask);
+
#ifdef CONFIG_IOMMU_DMA
void arch_teardown_dma_ops(struct device *dev);
#define arch_teardown_dma_ops arch_teardown_dma_ops
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index ea295f1..31b96fd 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -203,6 +203,37 @@ static void __dma_free(struct device *dev, size_t size,
__dma_free_coherent(dev, size, swiotlb_addr, dma_handle, attrs);
}
+int dma_set_mask(struct device *dev, u64 dma_mask)
+{
+ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ if (mask > dev->archdata.parent_dma_mask)
+ mask = dev->archdata.parent_dma_mask;
+
+ if (ops->set_dma_mask)
+ return ops->set_dma_mask(dev, mask);
+
+ if (!dev->dma_mask || !dma_supported(dev, mask))
+ return -EIO;
+
+ *dev->dma_mask = mask;
+ return 0;
+}
+EXPORT_SYMBOL(dma_set_mask);
+
+int dma_set_coherent_mask(struct device *dev, u64 mask)
+{
+ if (mask > dev->archdata.parent_dma_mask)
+ mask = dev->archdata.parent_dma_mask;
+
+ if (!dma_supported(dev, mask))
+ return -EIO;
+
+ dev->coherent_dma_mask = mask;
+ return 0;
+}
+EXPORT_SYMBOL(dma_set_coherent_mask);
+
static dma_addr_t __swiotlb_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size,
enum dma_data_direction dir,
@@ -959,6 +990,15 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
if (!dev->archdata.dma_ops)
dev->archdata.dma_ops = &swiotlb_dma_ops;
+ /*
+ * Whatever the parent bus can set. A device must not set
+ * a DMA mask larger than this.
+ */
+ if (enforce_range)
+ dev->archdata.parent_dma_mask = size - 1;
+ else
+ dev->archdata.parent_dma_mask = DMA_BIT_MASK(64);
+
dev->archdata.dma_coherent = coherent;
__iommu_setup_dma_ops(dev, dma_base, size, iommu);
}
--
2.1.4
^ permalink raw reply related
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Mark Rutland @ 2017-01-11 18:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170111180627.GG20288@e104818-lin.cambridge.arm.com>
On Wed, Jan 11, 2017 at 06:06:27PM +0000, Catalin Marinas wrote:
> On Wed, Jan 11, 2017 at 09:41:15AM -0500, Christopher Covington wrote:
> > -| Implementor | Component | Erratum ID | Kconfig |
> > +| Implementor | Component | Erratum ID | Kconfig |
> > +| Qualcomm | Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 |
>
> Please don't change the "Implementor" column width, there is no point
> and it makes the patch harder to read (i.e. this hunk should only have
> one line).
It'll need to affect all lines since the kconfig column needs to expand
by at least one character to fit QCOM_FALKOR_ERRATUM_1003.
I beleive the intent here was to keep the table fitting into a width of
80 characters.
IMO we should allow the table to expand past 80 chars (everyone reading
this file should be able to resize tehir terminal), and only expand the
kconfig column.
Thanks,
Mark.
^ permalink raw reply
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Timur Tabi @ 2017-01-11 18:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170111183339.GC29247@leverpostej>
On 01/11/2017 12:33 PM, Mark Rutland wrote:
> It'll need to affect all lines since the kconfig column needs to expand
> by at least one character to fit QCOM_FALKOR_ERRATUM_1003.
Or we can make the macro shorter.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Mark Rutland @ 2017-01-11 18:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <5da456f8-fcc5-b6e2-d58b-01a671da595b@codeaurora.org>
On Wed, Jan 11, 2017 at 12:35:55PM -0600, Timur Tabi wrote:
> On 01/11/2017 12:33 PM, Mark Rutland wrote:
> >It'll need to affect all lines since the kconfig column needs to expand
> >by at least one character to fit QCOM_FALKOR_ERRATUM_1003.
>
> Or we can make the macro shorter.
The name, as it is, is perfectly descriptive.
Let's not sacrifice legibility over a non-issue.
Thanks,
Mark.
^ permalink raw reply
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Timur Tabi @ 2017-01-11 18:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170111183738.GD29247@leverpostej>
On 01/11/2017 12:37 PM, Mark Rutland wrote:
> The name, as it is, is perfectly descriptive.
>
> Let's not sacrifice legibility over a non-issue.
I don't want to kick a dead horse or anything, but changing it to
QCOM_FLKR_ERRATUM_1003 would eliminate all the spacing problems without
sacrificing anything.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Mark Rutland @ 2017-01-11 18:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <278a45c0-bd49-b8a2-63ae-80ad851bab9b@arm.com>
On Wed, Jan 11, 2017 at 06:22:08PM +0000, Marc Zyngier wrote:
> On 11/01/17 18:06, Catalin Marinas wrote:
> > On Wed, Jan 11, 2017 at 09:41:15AM -0500, Christopher Covington wrote:
> >> diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
> >> index 32682be..9ee46df 100644
> >> --- a/arch/arm64/mm/proc.S
> >> +++ b/arch/arm64/mm/proc.S
> >> @@ -23,6 +23,7 @@
> >> #include <asm/assembler.h>
> >> #include <asm/asm-offsets.h>
> >> #include <asm/hwcap.h>
> >> +#include <asm/mmu_context.h>
> >> #include <asm/pgtable.h>
> >> #include <asm/pgtable-hwdef.h>
> >> #include <asm/cpufeature.h>
> >> @@ -140,6 +141,18 @@ ENDPROC(cpu_do_resume)
> >> ENTRY(cpu_do_switch_mm)
> >> mmid x1, x1 // get mm->context.id
> >> bfi x0, x1, #48, #16 // set the ASID
> >> +#ifdef CONFIG_QCOM_FALKOR_ERRATUM_1003
> >> +alternative_if ARM64_WORKAROUND_QCOM_FALKOR_E1003
> >> + mrs x2, ttbr0_el1
> >> + mov x3, #FALKOR_RESERVED_ASID
> >> + bfi x2, x3, #48, #16 // reserved ASID + old BADDR
> >> + msr ttbr0_el1, x2
> >> + isb
> >> + bfi x2, x0, #0, #48 // reserved ASID + new BADDR
> >> + msr ttbr0_el1, x2
> >> + isb
> >> +alternative_else_nop_endif
> >> +#endif
> >> msr ttbr0_el1, x0 // set TTBR0
> >> isb
> >> post_ttbr0_update_workaround
> >
> > Please move the above hunk to a pre_ttbr0_update_workaround macro for
> > consistency with post_ttbr0_update_workaround.
>
> In which case (and also for consistency), should we add that pre_ttbr0
> macro to entry.S, just before __uaccess_ttbr0_enable? It may not be
> needed in the SW pan case, but it is probably worth entertaining the
> idea that there may be something to do there...
Likewise, I beleive we may need to modify cpu_set_reserved_ttbr0().
Thanks,
Mark.
^ permalink raw reply
* [PATCH 32/62] watchdog: meson_gxbb_wdt: Convert to use device managed functions and other improvements
From: Kevin Hilman @ 2017-01-11 18:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1484095516-12720-2-git-send-email-linux@roeck-us.net>
Guenter Roeck <linux@roeck-us.net> writes:
> Use device managed functions to simplify error handling, reduce
> source code size, improve readability, and reduce the likelyhood of bugs.
> Other improvements as listed below.
>
> The conversion was done automatically with coccinelle using the
> following semantic patches. The semantic patches and the scripts used
> to generate this commit log are available at
> https://github.com/groeck/coccinelle-patches
>
> - Use devm_add_action_or_reset() for calls to clk_disable_unprepare
> - Check return value from clk_prepare_enable()
> - Replace 'val = e; return val;' with 'return e;'
> - Replace 'if (e) return e; return 0;' with 'return e;'
> - Drop assignments to otherwise unused variables
> - Replace 'if (e) { return expr; }' with 'if (e) return expr;'
> - Drop remove function
> - Use devm_watchdog_register_driver() to register watchdog device
> - Replace shutdown function with call to watchdog_stop_on_reboot()
>
> Cc: Carlo Caione <carlo@caione.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Nice, thanks for the cleanup!
Acked-by: Kevin Hilman <khilman@baylibre.com>
^ permalink raw reply
* [PATCH 33/62] watchdog: meson_wdt: Convert to use device managed functions and other improvements
From: Kevin Hilman @ 2017-01-11 18:45 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1484095516-12720-3-git-send-email-linux@roeck-us.net>
Guenter Roeck <linux@roeck-us.net> writes:
> Use device managed functions to simplify error handling, reduce
> source code size, improve readability, and reduce the likelyhood of bugs.
> Other improvements as listed below.
>
> The conversion was done automatically with coccinelle using the
> following semantic patches. The semantic patches and the scripts used
> to generate this commit log are available at
> https://github.com/groeck/coccinelle-patches
>
> - Drop assignments to otherwise unused variables
> - Drop remove function
> - Drop platform_set_drvdata()
> - Use devm_watchdog_register_driver() to register watchdog device
> - Replace shutdown function with call to watchdog_stop_on_reboot()
>
> Cc: Carlo Caione <carlo@caione.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Kevin Hilman <khilman@baylibre.com>
^ permalink raw reply
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Mark Rutland @ 2017-01-11 18:45 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <2069d58c-0b81-dad4-511f-05e7d002eb34@codeaurora.org>
On Wed, Jan 11, 2017 at 12:40:42PM -0600, Timur Tabi wrote:
> On 01/11/2017 12:37 PM, Mark Rutland wrote:
> >The name, as it is, is perfectly descriptive.
> >
> >Let's not sacrifice legibility over a non-issue.
>
> I don't want to kick a dead horse or anything, but changing it to
> QCOM_FLKR_ERRATUM_1003 would eliminate all the spacing problems
> without sacrificing anything.
The CPU is called "Falkor", not "FLKR", and we're not coming up with an
ACPI table name...
The ARM Ltd. erratum numbers are global to all parts, so we don't
include the part name. Is the 1003 erratum number specific to Falkor?
If it's global, you could use QCOM_ERRATUM_1003 instead.
Otherwise, QCOM_FALKOR_ERRATUM_1003 is preferable.
Thanks,
Mark.
^ permalink raw reply
* [PATCH v3 2/5] arm64: Work around Falkor erratum 1003
From: Marc Zyngier @ 2017-01-11 18:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <2069d58c-0b81-dad4-511f-05e7d002eb34@codeaurora.org>
[finally, some proper bikeshedding]
On 11/01/17 18:40, Timur Tabi wrote:
> On 01/11/2017 12:37 PM, Mark Rutland wrote:
>> The name, as it is, is perfectly descriptive.
>>
>> Let's not sacrifice legibility over a non-issue.
>
> I don't want to kick a dead horse or anything, but changing it to
> QCOM_FLKR_ERRATUM_1003 would eliminate all the spacing problems without
> sacrificing anything.
Other than not being able to grep for the core name in the source tree,
how do you suggest we pronounce FLKR? Because so far, it rolls off the
tongue in an interesting way...
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply
* kvm: deadlock in kvm_vgic_map_resources
From: Dmitry Vyukov @ 2017-01-11 19:01 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
While running syzkaller fuzzer I've got the following deadlock.
On commit 9c763584b7c8911106bb77af7e648bef09af9d80.
=============================================
[ INFO: possible recursive locking detected ]
4.9.0-rc6-xc2-00056-g08372dd4b91d-dirty #50 Not tainted
---------------------------------------------
syz-executor/20805 is trying to acquire lock:
(
&kvm->lock
){+.+.+.}
, at:
[< inline >] kvm_vgic_dist_destroy
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:271
[<ffff2000080ea4bc>] kvm_vgic_destroy+0x34/0x250
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:294
but task is already holding lock:
(&kvm->lock){+.+.+.}, at:
[<ffff2000080ea7e4>] kvm_vgic_map_resources+0x2c/0x108
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:343
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&kvm->lock);
lock(&kvm->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
2 locks held by syz-executor/20805:
#0:(&vcpu->mutex){+.+.+.}, at:
[<ffff2000080bcc30>] vcpu_load+0x28/0x1d0
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:143
#1:(&kvm->lock){+.+.+.}, at:
[<ffff2000080ea7e4>] kvm_vgic_map_resources+0x2c/0x108
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:343
stack backtrace:
CPU: 2 PID: 20805 Comm: syz-executor Not tainted
4.9.0-rc6-xc2-00056-g08372dd4b91d-dirty #50
Hardware name: Hardkernel ODROID-C2 (DT)
Call trace:
[<ffff200008090560>] dump_backtrace+0x0/0x3c8 arch/arm64/kernel/traps.c:69
[<ffff200008090948>] show_stack+0x20/0x30 arch/arm64/kernel/traps.c:219
[< inline >] __dump_stack lib/dump_stack.c:15
[<ffff200008895840>] dump_stack+0x100/0x150 lib/dump_stack.c:51
[< inline >] print_deadlock_bug kernel/locking/lockdep.c:1728
[< inline >] check_deadlock kernel/locking/lockdep.c:1772
[< inline >] validate_chain kernel/locking/lockdep.c:2250
[<ffff2000081c8718>] __lock_acquire+0x1938/0x3440 kernel/locking/lockdep.c:3335
[<ffff2000081caa84>] lock_acquire+0xdc/0x1d8 kernel/locking/lockdep.c:3746
[< inline >] __mutex_lock_common kernel/locking/mutex.c:521
[<ffff200009700004>] mutex_lock_nested+0xdc/0x7b8 kernel/locking/mutex.c:621
[< inline >] kvm_vgic_dist_destroy
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:271
[<ffff2000080ea4bc>] kvm_vgic_destroy+0x34/0x250
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:294
[<ffff2000080ec290>] vgic_v2_map_resources+0x218/0x430
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-v2.c:295
[<ffff2000080ea884>] kvm_vgic_map_resources+0xcc/0x108
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:348
[< inline >] kvm_vcpu_first_run_init
arch/arm64/kvm/../../../arch/arm/kvm/arm.c:505
[<ffff2000080d2768>] kvm_arch_vcpu_ioctl_run+0xab8/0xce0
arch/arm64/kvm/../../../arch/arm/kvm/arm.c:591
[<ffff2000080c1fec>] kvm_vcpu_ioctl+0x434/0xc08
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:2557
[< inline >] vfs_ioctl fs/ioctl.c:43
[<ffff200008450c38>] do_vfs_ioctl+0x128/0xfc0 fs/ioctl.c:679
[< inline >] SYSC_ioctl fs/ioctl.c:694
[<ffff200008451b78>] SyS_ioctl+0xa8/0xb8 fs/ioctl.c:685
[<ffff200008083ef0>] el0_svc_naked+0x24/0x28 arch/arm64/kernel/entry.S:755
INFO: task syz-executor:20805 blocked for more than 120 seconds.
Not tainted 4.9.0-rc6-xc2-00056-g08372dd4b91d-dirty #50
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor D 0 20805 1 0x00000001
Call trace:
[<ffff2000080894f4>] __switch_to+0x184/0x258 arch/arm64/kernel/process.c:345
[< inline >] context_switch kernel/sched/core.c:2899
[<ffff2000096fcc64>] __schedule+0x42c/0x1298 kernel/sched/core.c:3402
[<ffff2000096fdb98>] schedule+0xc8/0x260 kernel/sched/core.c:3457
[<ffff2000096fe654>] schedule_preempt_disabled+0x74/0x110
kernel/sched/core.c:3490
[< inline >] __mutex_lock_common kernel/locking/mutex.c:582
[<ffff200009700240>] mutex_lock_nested+0x318/0x7b8 kernel/locking/mutex.c:621
[< inline >] kvm_vgic_dist_destroy
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:271
[<ffff2000080ea4bc>] kvm_vgic_destroy+0x34/0x250
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:294
[<ffff2000080ec290>] vgic_v2_map_resources+0x218/0x430
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-v2.c:295
[<ffff2000080ea884>] kvm_vgic_map_resources+0xcc/0x108
arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.c:348
[< inline >] kvm_vcpu_first_run_init
arch/arm64/kvm/../../../arch/arm/kvm/arm.c:505
[<ffff2000080d2768>] kvm_arch_vcpu_ioctl_run+0xab8/0xce0
arch/arm64/kvm/../../../arch/arm/kvm/arm.c:591
[<ffff2000080c1fec>] kvm_vcpu_ioctl+0x434/0xc08
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:2557
[< inline >] vfs_ioctl fs/ioctl.c:43
[<ffff200008450c38>] do_vfs_ioctl+0x128/0xfc0 fs/ioctl.c:679
[< inline >] SYSC_ioctl fs/ioctl.c:694
[<ffff200008451b78>] SyS_ioctl+0xa8/0xb8 fs/ioctl.c:685
[<ffff200008083ef0>] el0_svc_naked+0x24/0x28 arch/arm64/kernel/entry.S:755
^ permalink raw reply
* [PATCH] PCI: thunder-pem: Add support for cn81xx and cn83xx SoCs.
From: David Daney @ 2017-01-11 19:11 UTC (permalink / raw)
To: linux-arm-kernel
From: David Daney <david.daney@cavium.com>
The pci-thunder-pem driver was initially developed for cn88xx SoCs.
The cn81xx and cn83xx members of the same family of SoCs has a
slightly different configuration of interrupt resources in the PEM
hardware, which prevents the INTA legacy interrupt source from
functioning with the current driver.
There are two fixes required:
1) Don't fixup the PME interrupt on the newer SoCs as it already has
the proper value.
2) Report MSI-X Capability Table Size of 2 for the newer SoCs, so the
core MSI-X code doesn't inadvertently clobber the INTA machinery that
happens to reside immediately following the table.
Signed-off-by: David Daney <david.daney@cavium.com>
---
drivers/pci/host/pci-thunder-pem.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
index af722eb..eea466f 100644
--- a/drivers/pci/host/pci-thunder-pem.c
+++ b/drivers/pci/host/pci-thunder-pem.c
@@ -36,7 +36,7 @@ struct thunder_pem_pci {
static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 *val)
{
- u64 read_val;
+ u64 read_val, tmp_val;
struct pci_config_window *cfg = bus->sysdata;
struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv;
@@ -65,13 +65,28 @@ static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn,
read_val |= 0x00007000; /* Skip MSI CAP */
break;
case 0x70: /* Express Cap */
- /* PME interrupt on vector 2*/
- read_val |= (2u << 25);
+ /*
+ * Change PME interrupt to vector 2 on T88 where it
+ * reads as 0, else leave it alone.
+ */
+ if (!(read_val & (0x1f << 25)))
+ read_val |= (2u << 25);
break;
case 0xb0: /* MSI-X Cap */
- /* TableSize=4, Next Cap is EA */
+ /* TableSize=2 or 4, Next Cap is EA */
read_val &= 0xc00000ff;
- read_val |= 0x0003bc00;
+ /*
+ * If Express Cap(0x70) raw PME vector reads as 2 we are on
+ * T88 and TableSize is reported as 4, else TableSize
+ * is 2.
+ */
+ writeq(0x70, pem_pci->pem_reg_base + PEM_CFG_RD);
+ tmp_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD);
+ tmp_val >>= 32;
+ if (!(tmp_val & (0x1f << 25)))
+ read_val |= 0x0003bc00;
+ else
+ read_val |= 0x0001bc00;
break;
case 0xb4:
/* Table offset=0, BIR=0 */
--
2.9.3
^ permalink raw reply related
* [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
From: Duc Dang @ 2017-01-11 19:14 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1484130407-24707-1-git-send-email-marc.zyngier@arm.com>
On Wed, Jan 11, 2017 at 2:26 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> The conversion to the new hotplug state machine introduced a regression
> where a successful hotplug registration would be treated as an error,
> effectively disabling the MSI driver forever.
>
> Fix it by doing the proper check on the return value.
Thanks, Marc.
Tested-by: Duc Dang <dhdang@apm.com>
>
> Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine")
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Duc Dang <dhdang@apm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: stable at vger.kernel.org
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> drivers/pci/host/pci-xgene-msi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
> index 1f38d08..f1b633b 100644
> --- a/drivers/pci/host/pci-xgene-msi.c
> +++ b/drivers/pci/host/pci-xgene-msi.c
> @@ -517,7 +517,7 @@ static int xgene_msi_probe(struct platform_device *pdev)
>
> rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "pci/xgene:online",
> xgene_msi_hwirq_alloc, NULL);
> - if (rc)
> + if (rc < 0)
> goto err_cpuhp;
> pci_xgene_online = rc;
> rc = cpuhp_setup_state(CPUHP_PCI_XGENE_DEAD, "pci/xgene:dead", NULL,
> --
> 2.1.4
>
Regards,
Duc Dang.
^ permalink raw reply
* [PATCH] PCI: thunder-pem: Add support for cn81xx and cn83xx SoCs.
From: David Daney @ 2017-01-11 19:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170111191141.28747-1-ddaney.cavm@gmail.com>
On 01/11/2017 11:11 AM, David Daney wrote:
> From: David Daney <david.daney@cavium.com>
>
> The pci-thunder-pem driver was initially developed for cn88xx SoCs.
> The cn81xx and cn83xx members of the same family of SoCs has a
> slightly different configuration of interrupt resources in the PEM
> hardware, which prevents the INTA legacy interrupt source from
> functioning with the current driver.
>
> There are two fixes required:
>
> 1) Don't fixup the PME interrupt on the newer SoCs as it already has
> the proper value.
>
> 2) Report MSI-X Capability Table Size of 2 for the newer SoCs, so the
> core MSI-X code doesn't inadvertently clobber the INTA machinery that
> happens to reside immediately following the table.
>
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
> drivers/pci/host/pci-thunder-pem.c | 25 ++++++++++++++++++++-----
> 1 file changed, 20 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
> index af722eb..eea466f 100644
> --- a/drivers/pci/host/pci-thunder-pem.c
> +++ b/drivers/pci/host/pci-thunder-pem.c
> @@ -36,7 +36,7 @@ struct thunder_pem_pci {
> static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn,
> int where, int size, u32 *val)
> {
> - u64 read_val;
> + u64 read_val, tmp_val;
> struct pci_config_window *cfg = bus->sysdata;
> struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv;
>
> @@ -65,13 +65,28 @@ static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn,
> read_val |= 0x00007000; /* Skip MSI CAP */
> break;
> case 0x70: /* Express Cap */
> - /* PME interrupt on vector 2*/
> - read_val |= (2u << 25);
> + /*
> + * Change PME interrupt to vector 2 on T88 where it
> + * reads as 0, else leave it alone.
> + */
> + if (!(read_val & (0x1f << 25)))
> + read_val |= (2u << 25);
> break;
> case 0xb0: /* MSI-X Cap */
> - /* TableSize=4, Next Cap is EA */
> + /* TableSize=2 or 4, Next Cap is EA */
> read_val &= 0xc00000ff;
> - read_val |= 0x0003bc00;
> + /*
> + * If Express Cap(0x70) raw PME vector reads as 2 we are on
Crap! The comment is incorrect s/2/0/, I guess I will send a corrected
patch. The code is correct though.
> + * T88 and TableSize is reported as 4, else TableSize
> + * is 2.
> + */
> + writeq(0x70, pem_pci->pem_reg_base + PEM_CFG_RD);
> + tmp_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD);
> + tmp_val >>= 32;
> + if (!(tmp_val & (0x1f << 25)))
> + read_val |= 0x0003bc00;
> + else
> + read_val |= 0x0001bc00;
> break;
> case 0xb4:
> /* Table offset=0, BIR=0 */
>
^ permalink raw reply
* [PATCH v2] PCI: thunder-pem: Add support for cn81xx and cn83xx SoCs.
From: David Daney @ 2017-01-11 19:22 UTC (permalink / raw)
To: linux-arm-kernel
From: David Daney <david.daney@cavium.com>
The pci-thunder-pem driver was initially developed for cn88xx SoCs.
The cn81xx and cn83xx members of the same family of SoCs has a
slightly different configuration of interrupt resources in the PEM
hardware, which prevents the INTA legacy interrupt source from
functioning with the current driver.
There are two fixes required:
1) Don't fixup the PME interrupt on the newer SoCs as it already has
the proper value.
2) Report MSI-X Capability Table Size of 2 for the newer SoCs, so the
core MSI-X code doesn't inadvertently clobber the INTA machinery that
happens to reside immediately following the table.
Signed-off-by: David Daney <david.daney@cavium.com>
---
Changes from v1: Fixed comment typo.
drivers/pci/host/pci-thunder-pem.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
index af722eb..52b5bdc 100644
--- a/drivers/pci/host/pci-thunder-pem.c
+++ b/drivers/pci/host/pci-thunder-pem.c
@@ -36,7 +36,7 @@ struct thunder_pem_pci {
static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 *val)
{
- u64 read_val;
+ u64 read_val, tmp_val;
struct pci_config_window *cfg = bus->sysdata;
struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv;
@@ -65,13 +65,28 @@ static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn,
read_val |= 0x00007000; /* Skip MSI CAP */
break;
case 0x70: /* Express Cap */
- /* PME interrupt on vector 2*/
- read_val |= (2u << 25);
+ /*
+ * Change PME interrupt to vector 2 on T88 where it
+ * reads as 0, else leave it alone.
+ */
+ if (!(read_val & (0x1f << 25)))
+ read_val |= (2u << 25);
break;
case 0xb0: /* MSI-X Cap */
- /* TableSize=4, Next Cap is EA */
+ /* TableSize=2 or 4, Next Cap is EA */
read_val &= 0xc00000ff;
- read_val |= 0x0003bc00;
+ /*
+ * If Express Cap(0x70) raw PME vector reads as 0 we are on
+ * T88 and TableSize is reported as 4, else TableSize
+ * is 2.
+ */
+ writeq(0x70, pem_pci->pem_reg_base + PEM_CFG_RD);
+ tmp_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD);
+ tmp_val >>= 32;
+ if (!(tmp_val & (0x1f << 25)))
+ read_val |= 0x0003bc00;
+ else
+ read_val |= 0x0001bc00;
break;
case 0xb4:
/* Table offset=0, BIR=0 */
--
2.9.3
^ permalink raw reply related
* [PATCH 2/5] clk: sunxi-ng: add support for V3s CCU
From: Icenowy Zheng @ 2017-01-11 19:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170110181006.yrd6moy2mctzoc4c@lukather>
11.01.2017, 02:10, "Maxime Ripard" <maxime.ripard@free-electrons.com>:
> On Tue, Jan 03, 2017 at 11:16:26PM +0800, Icenowy Zheng wrote:
>> ?V3s has a similar but cut-down CCU to H3.
>>
>> ?Add support for it.
>>
>> ?Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
>
> It looks like there's nothing different but the clocks that you
> register with the H3, please just use the H3 driver.
Nope.
It has a different PLL (PLL_ISP) at different address, and some
different muxes.
>
> Thanks!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox