tools/headers: Synchronize kernel ABI headers

After the SPDX license tags were added a number of tooling headers got out of
sync with their kernel variants, generating lots of build warnings.

Sync them:

- tools/arch/x86/include/asm/disabled-features.h,
tools/arch/x86/include/asm/required-features.h,
tools/include/linux/hash.h:

Remove the SPDX tag where the kernel version does not have it.

- tools/include/asm-generic/bitops/__fls.h,
tools/include/asm-generic/bitops/arch_hweight.h,
tools/include/asm-generic/bitops/const_hweight.h,
tools/include/asm-generic/bitops/fls.h,
tools/include/asm-generic/bitops/fls64.h,
tools/include/uapi/asm-generic/ioctls.h,
tools/include/uapi/asm-generic/mman-common.h,
tools/include/uapi/sound/asound.h,
tools/include/uapi/linux/kvm.h,
tools/include/uapi/linux/perf_event.h,
tools/include/uapi/linux/sched.h,
tools/include/uapi/linux/vhost.h,
tools/include/uapi/sound/asound.h:

Add the SPDX tag of the respective kernel header.

- tools/include/uapi/linux/bpf_common.h,
tools/include/uapi/linux/fcntl.h,
tools/include/uapi/linux/hw_breakpoint.h,
tools/include/uapi/linux/mman.h,
tools/include/uapi/linux/stat.h,

Change the tag to the kernel header version:

-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */

Also sync other header details:

- include/uapi/sound/asound.h:

Fix pointless end of line whitespace noise the header grew in this cycle.

- tools/arch/x86/lib/memcpy_64.S:

Sync the code and add tools/include/asm/export.h with dummy wrappers
to support building the kernel side code in a tooling header environment.

- tools/include/uapi/asm-generic/mman.h,
tools/include/uapi/linux/bpf.h:

Sync other details that don't impact tooling's use of the ABIs.

Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@kernel.org>

Changed files
+36 -16
include
uapi
sound
tools
+3 -3
include/uapi/sound/asound.h
··· 94 94 SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ 95 95 SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ 96 96 SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */ 97 - SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */ 97 + SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */ 98 98 SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */ 99 99 SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm */ 100 100 SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */ ··· 384 384 385 385 struct snd_pcm_hw_params { 386 386 unsigned int flags; 387 - struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 387 + struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 388 388 SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; 389 389 struct snd_mask mres[5]; /* reserved masks */ 390 390 struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - ··· 857 857 #define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */ 858 858 #define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */ 859 859 #define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */ 860 - #define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* kernel use a TLV callback */ 860 + #define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* kernel use a TLV callback */ 861 861 #define SNDRV_CTL_ELEM_ACCESS_USER (1<<29) /* user space element */ 862 862 /* bits 30 and 31 are obsoleted (for indirect access) */ 863 863
-1
tools/arch/x86/include/asm/disabled-features.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 1 #ifndef _ASM_X86_DISABLED_FEATURES_H 3 2 #define _ASM_X86_DISABLED_FEATURES_H 4 3
-1
tools/arch/x86/include/asm/required-features.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 1 #ifndef _ASM_X86_REQUIRED_FEATURES_H 3 2 #define _ASM_X86_REQUIRED_FEATURES_H 4 3
+1
tools/arch/x86/include/uapi/asm/unistd.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 #ifndef _UAPI_ASM_X86_UNISTD_H 2 3 #define _UAPI_ASM_X86_UNISTD_H 3 4
+4 -1
tools/arch/x86/lib/memcpy_64.S
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 1 /* Copyright 2002 Andi Kleen */ 3 2 4 3 #include <linux/linkage.h> 5 4 #include <asm/errno.h> 6 5 #include <asm/cpufeatures.h> 7 6 #include <asm/alternative-asm.h> 7 + #include <asm/export.h> 8 8 9 9 /* 10 10 * We build a jump to memcpy_orig by default which gets NOPped out on ··· 41 41 ret 42 42 ENDPROC(memcpy) 43 43 ENDPROC(__memcpy) 44 + EXPORT_SYMBOL(memcpy) 45 + EXPORT_SYMBOL(__memcpy) 44 46 45 47 /* 46 48 * memcpy_erms() - enhanced fast string memcpy. This is faster and ··· 277 275 xorq %rax, %rax 278 276 ret 279 277 ENDPROC(memcpy_mcsafe_unrolled) 278 + EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled) 280 279 281 280 .section .fixup, "ax" 282 281 /* Return -EFAULT for any failure */
+1
tools/include/asm-generic/bitops/__fls.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_GENERIC_BITOPS___FLS_H_ 2 3 #define _ASM_GENERIC_BITOPS___FLS_H_ 3 4
+1
tools/include/asm-generic/bitops/arch_hweight.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_ 2 3 #define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_ 3 4
+1
tools/include/asm-generic/bitops/const_hweight.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_ 2 3 #define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_ 3 4
+1
tools/include/asm-generic/bitops/fls.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_GENERIC_BITOPS_FLS_H_ 2 3 #define _ASM_GENERIC_BITOPS_FLS_H_ 3 4
+1
tools/include/asm-generic/bitops/fls64.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_GENERIC_BITOPS_FLS64_H_ 2 3 #define _ASM_GENERIC_BITOPS_FLS64_H_ 3 4
+7
tools/include/asm/export.h
··· 1 + #ifndef _TOOLS_ASM_EXPORT_H 2 + #define _TOOLS_ASM_EXPORT_H 3 + 4 + #define EXPORT_SYMBOL(x) 5 + #define EXPORT_SYMBOL_GPL(x) 6 + 7 + #endif /* _TOOLS_ASM_EXPORT_H */
-1
tools/include/linux/hash.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 1 #ifndef _LINUX_HASH_H 3 2 #define _LINUX_HASH_H 4 3 /* Fast hashing routine for ints, longs and pointers.
+1
tools/include/uapi/asm-generic/ioctls.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 #ifndef __ASM_GENERIC_IOCTLS_H 2 3 #define __ASM_GENERIC_IOCTLS_H 3 4
+1
tools/include/uapi/asm-generic/mman-common.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 #ifndef __ASM_GENERIC_MMAN_COMMON_H 2 3 #define __ASM_GENERIC_MMAN_COMMON_H 3 4
+2 -2
tools/include/uapi/asm-generic/mman.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef __ASM_GENERIC_MMAN_H 3 3 #define __ASM_GENERIC_MMAN_H 4 4 5 - #include <uapi/asm-generic/mman-common.h> 5 + #include <asm-generic/mman-common.h> 6 6 7 7 #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 8 8 #define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+2 -2
tools/include/uapi/linux/bpf.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 2 3 * 3 4 * This program is free software; you can redistribute it and/or ··· 570 569 * @flags: reserved for future use 571 570 * Return: 0 on success or negative error code 572 571 * 573 - * int bpf_sk_redirect_map(skb, map, key, flags) 572 + * int bpf_sk_redirect_map(map, key, flags) 574 573 * Redirect skb to a sock in map using key as a lookup key for the 575 574 * sock in map. 576 - * @skb: pointer to skb 577 575 * @map: pointer to sockmap 578 576 * @key: key to lookup sock in map 579 577 * @flags: reserved for future use
+1 -1
tools/include/uapi/linux/bpf_common.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI__LINUX_BPF_COMMON_H__ 3 3 #define _UAPI__LINUX_BPF_COMMON_H__ 4 4
+1 -1
tools/include/uapi/linux/fcntl.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI_LINUX_FCNTL_H 3 3 #define _UAPI_LINUX_FCNTL_H 4 4
+1 -1
tools/include/uapi/linux/hw_breakpoint.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI_LINUX_HW_BREAKPOINT_H 3 3 #define _UAPI_LINUX_HW_BREAKPOINT_H 4 4
+1
tools/include/uapi/linux/kvm.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 #ifndef __LINUX_KVM_H 2 3 #define __LINUX_KVM_H 3 4
+1 -1
tools/include/uapi/linux/mman.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI_LINUX_MMAN_H 3 3 #define _UAPI_LINUX_MMAN_H 4 4
+1
tools/include/uapi/linux/perf_event.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 /* 2 3 * Performance events: 3 4 *
+1
tools/include/uapi/linux/sched.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 #ifndef _UAPI_LINUX_SCHED_H 2 3 #define _UAPI_LINUX_SCHED_H 3 4
+1 -1
tools/include/uapi/linux/stat.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI_LINUX_STAT_H 3 3 #define _UAPI_LINUX_STAT_H 4 4
+1
tools/include/uapi/linux/vhost.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 #ifndef _LINUX_VHOST_H 2 3 #define _LINUX_VHOST_H 3 4 /* Userspace interface for in-kernel virtio accelerators. */
+1
tools/include/uapi/sound/asound.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 1 2 /* 2 3 * Advanced Linux Sound Architecture - ALSA - Driver 3 4 * Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,